--- a/QTfrontend/gameuiconfig.cpp Thu Jan 29 17:27:43 2009 +0000
+++ b/QTfrontend/gameuiconfig.cpp Fri Jan 30 14:56:27 2009 +0000
@@ -46,6 +46,7 @@
Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool());
Form->ui.pageOptions->CBEnableMusic->setChecked(value("audio/music", true).toBool());
+ Form->ui.pageOptions->volumeBox->setValue(value("audio/volume", 100).toUInt());
Form->ui.pageOptions->editNetNick->setText(value("net/nick", QLineEdit::tr("unnamed")).toString());
@@ -99,6 +100,7 @@
setValue("audio/sound", isSoundEnabled());
setValue("audio/music", isMusicEnabled());
+ setValue("audio/volume", Form->ui.pageOptions->volumeBox->value());
setValue("net/nick", netNick());
setValue("net/ip", *netHost);
@@ -174,3 +176,8 @@
{
return Form->ui.pageOptions->editNetNick->text();
}
+
+quint8 GameUIConfig::volume()
+{
+ return Form->ui.pageOptions->volumeBox->value() * 128 / 100;
+}