QTfrontend/hwform.cpp
changeset 15095 33eca3f0a9aa
parent 14939 0ec0ed2d9045
child 15197 a5fb73335a87
--- a/QTfrontend/hwform.cpp	Fri May 31 21:34:32 2019 +0300
+++ b/QTfrontend/hwform.cpp	Fri May 31 21:10:17 2019 +0200
@@ -168,6 +168,9 @@
 
     config = new GameUIConfig(this, DataManager::instance().settingsFileName());
     frontendEffects = config->value("frontend/effects", true).toBool();
+    bool frontendSounds = config->value("frontend/sound", true).toBool();
+    onFrontendSoundsToggled(frontendSounds);
+
     playerHash = QString(QCryptographicHash::hash(config->value("net/nick", config->getRandomNick()).toString().toUtf8(), QCryptographicHash::Md5).toHex());
 
     // Icons for finished missions
@@ -289,6 +292,7 @@
     connect(ui.pageOptions->SchemeNew, SIGNAL(clicked()), this, SLOT(GoToNewScheme()));
     connect(ui.pageOptions->SchemeDelete, SIGNAL(clicked()), this, SLOT(DeleteScheme()));
     connect(ui.pageOptions->CBFrontendEffects, SIGNAL(toggled(bool)), this, SLOT(onFrontendEffects(bool)) );
+    connect(ui.pageOptions->CBFrontendSound, SIGNAL(toggled(bool)), this, SLOT(onFrontendSoundsToggled(bool)));
 
     connect(ui.pageNet->BtnSpecifyServer, SIGNAL(clicked()), this, SLOT(NetConnect()));
     connect(ui.pageNet->BtnNetSvrStart, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
@@ -410,6 +414,11 @@
         wBackground->stopAnimation();
 }
 
+void HWForm::onFrontendSoundsToggled(bool value)
+{
+    ui.pageEditTeam->frontendSoundsToggled(value);
+}
+
 /*
 void HWForm::keyReleaseEvent(QKeyEvent *event)
 {