QTfrontend/gameuiconfig.cpp
changeset 2261 57e99c908e7c
parent 2216 82e7da49c26a
child 2276 d4d9e490d534
equal deleted inserted replaced
2260:31756e21c436 2261:57e99c908e7c
    62 	Form->ui.pageOptions->CBShowFPS->setChecked(value("fps/show", false).toBool());
    62 	Form->ui.pageOptions->CBShowFPS->setChecked(value("fps/show", false).toBool());
    63 	Form->ui.pageOptions->fpsedit->setValue(value("fps/interval", 27).toUInt());
    63 	Form->ui.pageOptions->fpsedit->setValue(value("fps/interval", 27).toUInt());
    64 
    64 
    65 	Form->ui.pageOptions->CBAltDamage->setChecked(value("misc/altdamage", false).toBool());
    65 	Form->ui.pageOptions->CBAltDamage->setChecked(value("misc/altdamage", false).toBool());
    66 	Form->ui.pageOptions->CBNameWithDate->setChecked(value("misc/appendTimeToRecords", false).toBool());
    66 	Form->ui.pageOptions->CBNameWithDate->setChecked(value("misc/appendTimeToRecords", false).toBool());
    67 
    67     
       
    68 #ifdef __APPLE__
       
    69     //autoupdate
       
    70     Form->ui.pageOptions->CBAutoUpdate->setChecked(value("misc/autoUpdate", true).toBool());
       
    71 #endif
       
    72     
    68 	depth = QApplication::desktop()->depth();
    73 	depth = QApplication::desktop()->depth();
    69 	if (depth < 16) depth = 16;
    74 	if (depth < 16) depth = 16;
    70 	else if (depth > 16) depth = 32;
    75 	else if (depth > 16) depth = 32;
    71 }
    76 }
    72 
    77 
   118 	setValue("fps/show", isShowFPSEnabled());
   123 	setValue("fps/show", isShowFPSEnabled());
   119 	setValue("fps/interval", Form->ui.pageOptions->fpsedit->value());
   124 	setValue("fps/interval", Form->ui.pageOptions->fpsedit->value());
   120 
   125 
   121 	setValue("misc/altdamage", isAltDamageEnabled());
   126 	setValue("misc/altdamage", isAltDamageEnabled());
   122 	setValue("misc/appendTimeToRecords", appendDateTimeToRecordName());
   127 	setValue("misc/appendTimeToRecords", appendDateTimeToRecordName());
       
   128     
       
   129 #ifdef __APPLE__
       
   130     //autoupdate
       
   131     setValue("misc/autoUpdate", isAutoUpdateEnabled());
       
   132 #endif 
   123 }
   133 }
   124 
   134 
   125 QRect GameUIConfig::vid_Resolution()
   135 QRect GameUIConfig::vid_Resolution()
   126 {
   136 {
   127 	QRect result(0, 0, 640, 480);
   137 	QRect result(0, 0, 640, 480);
   176 bool GameUIConfig::appendDateTimeToRecordName()
   186 bool GameUIConfig::appendDateTimeToRecordName()
   177 {
   187 {
   178 	return Form->ui.pageOptions->CBNameWithDate->isChecked();
   188 	return Form->ui.pageOptions->CBNameWithDate->isChecked();
   179 }
   189 }
   180 
   190 
       
   191 #ifdef __APPLE__
       
   192 //autoupdate
       
   193 bool GameUIConfig::isAutoUpdateEnabled()
       
   194 {
       
   195     return Form->ui.pageOptions->CBAutoUpdate->isChecked();
       
   196 }
       
   197 #endif
       
   198 
   181 quint8 GameUIConfig::timerInterval()
   199 quint8 GameUIConfig::timerInterval()
   182 {
   200 {
   183 	return 35 - Form->ui.pageOptions->fpsedit->value();
   201 	return 35 - Form->ui.pageOptions->fpsedit->value();
   184 }
   202 }
   185 
   203