QTfrontend/gameuiconfig.cpp
changeset 2443 fececcbc2189
parent 2395 d01d3bf3e1de
child 2531 c7f841eb91fb
equal deleted inserted replaced
2442:228757f6c54d 2443:fececcbc2189
    46 	Form->ui.pageOptions->CBFrontendFullscreen->setChecked(ffscr);
    46 	Form->ui.pageOptions->CBFrontendFullscreen->setChecked(ffscr);
    47 
    47 
    48 	Form->ui.pageOptions->CBReduceQuality->setChecked(value("video/reducequality", false).toBool());
    48 	Form->ui.pageOptions->CBReduceQuality->setChecked(value("video/reducequality", false).toBool());
    49 	Form->ui.pageOptions->CBFrontendEffects->setChecked(frontendEffects);
    49 	Form->ui.pageOptions->CBFrontendEffects->setChecked(frontendEffects);
    50 	Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool());
    50 	Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool());
       
    51 #ifdef _WIN32
    51 	Form->ui.pageOptions->CBHardwareSound->setChecked(value("audio/hardware", false).toBool());
    52 	Form->ui.pageOptions->CBHardwareSound->setChecked(value("audio/hardware", false).toBool());
       
    53 #endif
    52 	Form->ui.pageOptions->CBEnableMusic->setChecked(value("audio/music", true).toBool());
    54 	Form->ui.pageOptions->CBEnableMusic->setChecked(value("audio/music", true).toBool());
    53 	Form->ui.pageOptions->volumeBox->setValue(value("audio/volume", 100).toUInt());
    55 	Form->ui.pageOptions->volumeBox->setValue(value("audio/volume", 100).toUInt());
    54 
    56 
    55 	QString netNick = value("net/nick", "").toString();
    57 	QString netNick = value("net/nick", "").toString();
    56 	if (netNick.isEmpty())
    58 	if (netNick.isEmpty())
   118 	} else {
   120 	} else {
   119 	  //resizeToConfigValues(); // TODO: why this has been made?
   121 	  //resizeToConfigValues(); // TODO: why this has been made?
   120 	}
   122 	}
   121 
   123 
   122 	setValue("audio/sound", isSoundEnabled());
   124 	setValue("audio/sound", isSoundEnabled());
       
   125 #ifdef _WIN32
   123 	setValue("audio/hardware", isSoundHardware());
   126 	setValue("audio/hardware", isSoundHardware());
       
   127 #endif
   124 	setValue("audio/music", isMusicEnabled());
   128 	setValue("audio/music", isMusicEnabled());
   125 	setValue("audio/volume", Form->ui.pageOptions->volumeBox->value());
   129 	setValue("audio/volume", Form->ui.pageOptions->volumeBox->value());
   126 
   130 
   127 	setValue("net/nick", netNick());
   131 	setValue("net/nick", netNick());
   128 	setValue("net/ip", *netHost);
   132 	setValue("net/ip", *netHost);
   175 bool GameUIConfig::isSoundEnabled()
   179 bool GameUIConfig::isSoundEnabled()
   176 {
   180 {
   177 	return Form->ui.pageOptions->CBEnableSound->isChecked();
   181 	return Form->ui.pageOptions->CBEnableSound->isChecked();
   178 }
   182 }
   179 
   183 
       
   184 #ifdef _WIN32
   180 bool GameUIConfig::isSoundHardware()
   185 bool GameUIConfig::isSoundHardware()
   181 {
   186 {
   182 	return Form->ui.pageOptions->CBHardwareSound->isChecked();
   187 	return Form->ui.pageOptions->CBHardwareSound->isChecked();
   183 }
   188 }
       
   189 #endif
   184 
   190 
   185 bool GameUIConfig::isMusicEnabled()
   191 bool GameUIConfig::isMusicEnabled()
   186 {
   192 {
   187 	return Form->ui.pageOptions->CBEnableMusic->isChecked();
   193 	return Form->ui.pageOptions->CBEnableMusic->isChecked();
   188 }
   194 }