QTfrontend/gameuiconfig.cpp
changeset 8387 f9d1191476ce
parent 8386 2aaa2995a32e
child 8434 4821897a0f10
equal deleted inserted replaced
8386:2aaa2995a32e 8387:f9d1191476ce
   107     Form->ui.pageOptions->CBFrontendEffects->setChecked(value("frontend/effects", true).toBool());
   107     Form->ui.pageOptions->CBFrontendEffects->setChecked(value("frontend/effects", true).toBool());
   108     Form->ui.pageOptions->CBSound->setChecked(value("audio/sound", true).toBool());
   108     Form->ui.pageOptions->CBSound->setChecked(value("audio/sound", true).toBool());
   109     Form->ui.pageOptions->CBFrontendSound->setChecked(value("frontend/sound", true).toBool());
   109     Form->ui.pageOptions->CBFrontendSound->setChecked(value("frontend/sound", true).toBool());
   110     Form->ui.pageOptions->CBMusic->setChecked(value("audio/music", true).toBool());
   110     Form->ui.pageOptions->CBMusic->setChecked(value("audio/music", true).toBool());
   111     Form->ui.pageOptions->CBFrontendMusic->setChecked(value("frontend/music", true).toBool());
   111     Form->ui.pageOptions->CBFrontendMusic->setChecked(value("frontend/music", true).toBool());
   112     Form->ui.pageOptions->volumeBox->setValue(value("audio/volume", 100).toUInt());
   112     Form->ui.pageOptions->SLVolume->setValue(value("audio/volume", 100).toUInt());
   113 
   113 
   114     QString netNick = value("net/nick", "").toString();
   114     QString netNick = value("net/nick", "").toString();
   115     Form->ui.pageOptions->editNetNick->setText(netNick);
   115     Form->ui.pageOptions->editNetNick->setText(netNick);
   116     bool savePwd = value("net/savepassword",true).toBool();
   116     bool savePwd = value("net/savepassword",true).toBool();
   117     Form->ui.pageOptions->CBSavePassword->setChecked(savePwd);
   117     Form->ui.pageOptions->CBSavePassword->setChecked(savePwd);
   257 
   257 
   258     setValue("audio/sound", isSoundEnabled());
   258     setValue("audio/sound", isSoundEnabled());
   259     setValue("frontend/sound", isFrontendSoundEnabled());
   259     setValue("frontend/sound", isFrontendSoundEnabled());
   260     setValue("audio/music", isMusicEnabled());
   260     setValue("audio/music", isMusicEnabled());
   261     setValue("frontend/music", isFrontendMusicEnabled());
   261     setValue("frontend/music", isFrontendMusicEnabled());
   262     setValue("audio/volume", Form->ui.pageOptions->volumeBox->value());
   262     setValue("audio/volume", Form->ui.pageOptions->SLVolume->value());
   263 
   263 
   264     setValue("net/nick", netNick());
   264     setValue("net/nick", netNick());
   265     if (netPasswordIsValid() && Form->ui.pageOptions->CBSavePassword->isChecked()) {
   265     if (netPasswordIsValid() && Form->ui.pageOptions->CBSavePassword->isChecked()) {
   266 	setPasswordHash(netPasswordHash());
   266 	setPasswordHash(netPasswordHash());
   267     }
   267     }
   579     }
   579     }
   580 }
   580 }
   581 
   581 
   582 quint8 GameUIConfig::volume()
   582 quint8 GameUIConfig::volume()
   583 {
   583 {
   584     return Form->ui.pageOptions->volumeBox->value() * 128 / 100;
   584     return Form->ui.pageOptions->SLVolume->value() * 128 / 100;
   585 }
   585 }
   586 
   586 
   587 QString GameUIConfig::AVFormat()
   587 QString GameUIConfig::AVFormat()
   588 {
   588 {
   589     return Form->ui.pageOptions->format();
   589     return Form->ui.pageOptions->format();