equal
deleted
inserted
replaced
73 Form->ui.pageOptions->fpsedit->setValue(value("fps/interval", 27).toUInt()); |
73 Form->ui.pageOptions->fpsedit->setValue(value("fps/interval", 27).toUInt()); |
74 |
74 |
75 Form->ui.pageOptions->CBAltDamage->setChecked(value("misc/altdamage", false).toBool()); |
75 Form->ui.pageOptions->CBAltDamage->setChecked(value("misc/altdamage", false).toBool()); |
76 Form->ui.pageOptions->CBNameWithDate->setChecked(value("misc/appendTimeToRecords", false).toBool()); |
76 Form->ui.pageOptions->CBNameWithDate->setChecked(value("misc/appendTimeToRecords", false).toBool()); |
77 |
77 |
78 #ifdef __APPLE__ |
78 #ifdef SPARKLE_ENABLED |
79 //autoupdate |
79 Form->ui.pageOptions->CBAutoUpdate->setChecked(value("misc/autoUpdate", true).toBool()); |
80 Form->ui.pageOptions->CBAutoUpdate->setChecked(value("misc/autoUpdate", true).toBool()); |
|
81 #endif |
80 #endif |
82 |
81 |
83 depth = QApplication::desktop()->depth(); |
82 depth = QApplication::desktop()->depth(); |
84 if (depth < 16) depth = 16; |
83 if (depth < 16) depth = 16; |
85 else if (depth > 16) depth = 32; |
84 else if (depth > 16) depth = 32; |
88 QStringList GameUIConfig::GetTeamsList() |
87 QStringList GameUIConfig::GetTeamsList() |
89 { |
88 { |
90 QStringList teamslist = cfgdir->entryList(QStringList("*.cfg")); |
89 QStringList teamslist = cfgdir->entryList(QStringList("*.cfg")); |
91 QStringList cleanedList; |
90 QStringList cleanedList; |
92 for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) { |
91 for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) { |
93 QString tmpTeamStr=(*it).replace(QRegExp("^(.*)\\.cfg$"), "\\1"); |
92 QString tmpTeamStr=(*it).replace(QRegExp("^(.*)\\.cfg$"), "\\1"); |
94 cleanedList.push_back(tmpTeamStr); |
93 cleanedList.push_back(tmpTeamStr); |
95 } |
94 } |
96 return cleanedList; |
95 return cleanedList; |
97 } |
96 } |
98 |
97 |
99 void GameUIConfig::resizeToConfigValues() |
98 void GameUIConfig::resizeToConfigValues() |
100 { |
99 { |
101 Form->resize(value("window/width", 720).toUInt(), value("window/height", 450).toUInt()); |
100 Form->resize(value("window/width", 720).toUInt(), value("window/height", 450).toUInt()); |
102 } |
101 } |
103 |
102 |
104 void GameUIConfig::SaveOptions() |
103 void GameUIConfig::SaveOptions() |
105 { |
104 { |
106 setValue("video/resolution", Form->ui.pageOptions->CBResolution->currentText()); |
105 setValue("video/resolution", Form->ui.pageOptions->CBResolution->currentText()); |
135 setValue("fps/interval", Form->ui.pageOptions->fpsedit->value()); |
134 setValue("fps/interval", Form->ui.pageOptions->fpsedit->value()); |
136 |
135 |
137 setValue("misc/altdamage", isAltDamageEnabled()); |
136 setValue("misc/altdamage", isAltDamageEnabled()); |
138 setValue("misc/appendTimeToRecords", appendDateTimeToRecordName()); |
137 setValue("misc/appendTimeToRecords", appendDateTimeToRecordName()); |
139 |
138 |
140 #ifdef __APPLE__ |
139 #ifdef SPARKLE_ENABLED |
141 //autoupdate |
140 setValue("misc/autoUpdate", isAutoUpdateEnabled()); |
142 setValue("misc/autoUpdate", isAutoUpdateEnabled()); |
|
143 #endif |
141 #endif |
144 } |
142 } |
145 |
143 |
146 QRect GameUIConfig::vid_Resolution() |
144 QRect GameUIConfig::vid_Resolution() |
147 { |
145 { |
202 bool GameUIConfig::appendDateTimeToRecordName() |
200 bool GameUIConfig::appendDateTimeToRecordName() |
203 { |
201 { |
204 return Form->ui.pageOptions->CBNameWithDate->isChecked(); |
202 return Form->ui.pageOptions->CBNameWithDate->isChecked(); |
205 } |
203 } |
206 |
204 |
207 #ifdef __APPLE__ |
205 #ifdef SPARKLE_ENABLED |
208 //autoupdate |
|
209 bool GameUIConfig::isAutoUpdateEnabled() |
206 bool GameUIConfig::isAutoUpdateEnabled() |
210 { |
207 { |
211 return Form->ui.pageOptions->CBAutoUpdate->isChecked(); |
208 return Form->ui.pageOptions->CBAutoUpdate->isChecked(); |
212 } |
209 } |
213 #endif |
210 #endif |