QTfrontend/gameuiconfig.cpp
changeset 1129 b74ffca22762
parent 1066 1f1b3686a2b0
child 1162 91bf5e3e558d
equal deleted inserted replaced
1128:9b3f42bf4eef 1129:b74ffca22762
    38 	int t = Form->ui.pageOptions->CBResolution->findText(value("video/resolution").toString());
    38 	int t = Form->ui.pageOptions->CBResolution->findText(value("video/resolution").toString());
    39 	Form->ui.pageOptions->CBResolution->setCurrentIndex((t < 0) ? 0 : t);
    39 	Form->ui.pageOptions->CBResolution->setCurrentIndex((t < 0) ? 0 : t);
    40 	Form->ui.pageOptions->CBFullscreen->setChecked(value("video/fullscreen", false).toBool());
    40 	Form->ui.pageOptions->CBFullscreen->setChecked(value("video/fullscreen", false).toBool());
    41 
    41 
    42 	Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool());
    42 	Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool());
       
    43 	Form->ui.pageOptions->CBEnableMusic->setChecked(value("audio/music", true).toBool());
    43 
    44 
    44 	Form->ui.pageOptions->editNetNick->setText(value("net/nick", QLineEdit::tr("unnamed")).toString());
    45 	Form->ui.pageOptions->editNetNick->setText(value("net/nick", QLineEdit::tr("unnamed")).toString());
    45 
    46 
    46 	delete netHost;
    47 	delete netHost;
    47 	netHost = new QString(value("net/ip", "").toString());
    48 	netHost = new QString(value("net/ip", "").toString());
    75 {
    76 {
    76 	setValue("video/resolution", Form->ui.pageOptions->CBResolution->currentText());
    77 	setValue("video/resolution", Form->ui.pageOptions->CBResolution->currentText());
    77 	setValue("video/fullscreen", vid_Fullscreen());
    78 	setValue("video/fullscreen", vid_Fullscreen());
    78 
    79 
    79 	setValue("audio/sound", isSoundEnabled());
    80 	setValue("audio/sound", isSoundEnabled());
       
    81 	setValue("audio/music", isMusicEnabled());
    80 
    82 
    81 	setValue("net/nick", netNick());
    83 	setValue("net/nick", netNick());
    82 	setValue("net/ip", *netHost);
    84 	setValue("net/ip", *netHost);
    83 	setValue("net/port", netPort);
    85 	setValue("net/port", netPort);
    84 	setValue("net/servername", Form->ui.pageNetServer->leServerDescr->text());
    86 	setValue("net/servername", Form->ui.pageNetServer->leServerDescr->text());
   113 bool GameUIConfig::isSoundEnabled()
   115 bool GameUIConfig::isSoundEnabled()
   114 {
   116 {
   115 	return Form->ui.pageOptions->CBEnableSound->isChecked();
   117 	return Form->ui.pageOptions->CBEnableSound->isChecked();
   116 }
   118 }
   117 
   119 
       
   120 bool GameUIConfig::isMusicEnabled()
       
   121 {
       
   122 	return Form->ui.pageOptions->CBEnableMusic->isChecked();
       
   123 }
       
   124 
   118 bool GameUIConfig::isShowFPSEnabled()
   125 bool GameUIConfig::isShowFPSEnabled()
   119 {
   126 {
   120 	return Form->ui.pageOptions->CBShowFPS->isChecked();
   127 	return Form->ui.pageOptions->CBShowFPS->isChecked();
   121 }
   128 }
   122 
   129