QTfrontend/gameuiconfig.cpp
changeset 13628 d5e029b84e16
parent 13080 23a498a2b5b8
child 14063 b8df809c62bf
equal deleted inserted replaced
13627:605767bbd022 13628:d5e029b84e16
   109     Form->ui.pageOptions->CBFrontendEffects->setChecked(value("frontend/effects", true).toBool());
   109     Form->ui.pageOptions->CBFrontendEffects->setChecked(value("frontend/effects", true).toBool());
   110     Form->ui.pageOptions->CBSound->setChecked(value("audio/sound", true).toBool());
   110     Form->ui.pageOptions->CBSound->setChecked(value("audio/sound", true).toBool());
   111     Form->ui.pageOptions->CBFrontendSound->setChecked(value("frontend/sound", true).toBool());
   111     Form->ui.pageOptions->CBFrontendSound->setChecked(value("frontend/sound", true).toBool());
   112     Form->ui.pageOptions->CBMusic->setChecked(value("audio/music", true).toBool());
   112     Form->ui.pageOptions->CBMusic->setChecked(value("audio/music", true).toBool());
   113     Form->ui.pageOptions->CBFrontendMusic->setChecked(value("frontend/music", true).toBool());
   113     Form->ui.pageOptions->CBFrontendMusic->setChecked(value("frontend/music", true).toBool());
       
   114     Form->ui.pageOptions->CBDampenAudio->setChecked(value("audio/dampen", true).toBool());
   114     Form->ui.pageOptions->SLVolume->setValue(value("audio/volume", 100).toUInt());
   115     Form->ui.pageOptions->SLVolume->setValue(value("audio/volume", 100).toUInt());
   115 
   116 
   116     QString netNick = value("net/nick", tr("Guest")+QString("%1").arg(rand())).toString();
   117     QString netNick = value("net/nick", tr("Guest")+QString("%1").arg(rand())).toString();
   117     Form->ui.pageOptions->editNetNick->setText(netNick);
   118     Form->ui.pageOptions->editNetNick->setText(netNick);
   118     bool savePwd = value("net/savepassword",true).toBool();
   119     bool savePwd = value("net/savepassword",true).toBool();
   266     setValue("audio/sound", isSoundEnabled());
   267     setValue("audio/sound", isSoundEnabled());
   267     setValue("frontend/sound", isFrontendSoundEnabled());
   268     setValue("frontend/sound", isFrontendSoundEnabled());
   268     setValue("audio/music", isMusicEnabled());
   269     setValue("audio/music", isMusicEnabled());
   269     setValue("frontend/music", isFrontendMusicEnabled());
   270     setValue("frontend/music", isFrontendMusicEnabled());
   270     setValue("audio/volume", Form->ui.pageOptions->SLVolume->value());
   271     setValue("audio/volume", Form->ui.pageOptions->SLVolume->value());
       
   272     setValue("audio/dampen", isAudioDampenEnabled());
   271 
   273 
   272     setValue("net/nick", netNick());
   274     setValue("net/nick", netNick());
   273     if (netPasswordIsValid() && Form->ui.pageOptions->CBSavePassword->isChecked()) {
   275     if (netPasswordIsValid() && Form->ui.pageOptions->CBSavePassword->isChecked()) {
   274         setPasswordHash(netPasswordHash());
   276         setPasswordHash(netPasswordHash());
   275     }
   277     }
   454 }
   456 }
   455 bool GameUIConfig::isFrontendMusicEnabled()
   457 bool GameUIConfig::isFrontendMusicEnabled()
   456 {
   458 {
   457     return Form->ui.pageOptions->CBFrontendMusic->isChecked();
   459     return Form->ui.pageOptions->CBFrontendMusic->isChecked();
   458 }
   460 }
       
   461 bool GameUIConfig::isAudioDampenEnabled()
       
   462 {
       
   463     return Form->ui.pageOptions->CBDampenAudio->isChecked();
       
   464 }
   459 
   465 
   460 bool GameUIConfig::isShowFPSEnabled()
   466 bool GameUIConfig::isShowFPSEnabled()
   461 {
   467 {
   462     return Form->ui.pageOptions->CBShowFPS->isChecked();
   468     return Form->ui.pageOptions->CBShowFPS->isChecked();
   463 }
   469 }