QTfrontend/gameuiconfig.cpp
changeset 1487 b4cc59a6d50a
parent 1235 070629f3902d
child 1777 88674c291331
equal deleted inserted replaced
1486:8fcc64446a97 1487:b4cc59a6d50a
    58 
    58 
    59 	Form->ui.pageOptions->CBShowFPS->setChecked(value("fps/show", false).toBool());
    59 	Form->ui.pageOptions->CBShowFPS->setChecked(value("fps/show", false).toBool());
    60 	Form->ui.pageOptions->fpsedit->setValue(value("fps/interval", 27).toUInt());
    60 	Form->ui.pageOptions->fpsedit->setValue(value("fps/interval", 27).toUInt());
    61 
    61 
    62 	Form->ui.pageOptions->CBAltDamage->setChecked(value("misc/altdamage", false).toBool());
    62 	Form->ui.pageOptions->CBAltDamage->setChecked(value("misc/altdamage", false).toBool());
       
    63 	Form->ui.pageOptions->CBNameWithDate->setChecked(value("misc/appendTimeToRecords", false).toBool());
    63 
    64 
    64 	depth = QApplication::desktop()->depth();
    65 	depth = QApplication::desktop()->depth();
    65 	if (depth < 16) depth = 16;
    66 	if (depth < 16) depth = 16;
    66 	else if (depth > 16) depth = 32;
    67 	else if (depth > 16) depth = 32;
    67 }
    68 }
   107 
   108 
   108 	setValue("fps/show", isShowFPSEnabled());
   109 	setValue("fps/show", isShowFPSEnabled());
   109 	setValue("fps/interval", Form->ui.pageOptions->fpsedit->value());
   110 	setValue("fps/interval", Form->ui.pageOptions->fpsedit->value());
   110 
   111 
   111 	setValue("misc/altdamage", isAltDamageEnabled());
   112 	setValue("misc/altdamage", isAltDamageEnabled());
       
   113 	setValue("misc/appendTimeToRecords", appendDateTimeToRecordName());
   112 }
   114 }
   113 
   115 
   114 QRect GameUIConfig::vid_Resolution()
   116 QRect GameUIConfig::vid_Resolution()
   115 {
   117 {
   116 	QRect result(0, 0, 640, 480);
   118 	QRect result(0, 0, 640, 480);
   148 	return Form->ui.pageOptions->CBShowFPS->isChecked();
   150 	return Form->ui.pageOptions->CBShowFPS->isChecked();
   149 }
   151 }
   150 
   152 
   151 bool GameUIConfig::isAltDamageEnabled()
   153 bool GameUIConfig::isAltDamageEnabled()
   152 {
   154 {
   153 	return Form->ui.pageOptions->CBAltDamage->isChecked();;
   155 	return Form->ui.pageOptions->CBAltDamage->isChecked();
       
   156 }
       
   157 
       
   158 bool GameUIConfig::appendDateTimeToRecordName()
       
   159 {
       
   160 	return Form->ui.pageOptions->CBNameWithDate->isChecked();
   154 }
   161 }
   155 
   162 
   156 quint8 GameUIConfig::timerInterval()
   163 quint8 GameUIConfig::timerInterval()
   157 {
   164 {
   158 	return 35 - Form->ui.pageOptions->fpsedit->value();
   165 	return 35 - Form->ui.pageOptions->fpsedit->value();