| 184 | } |
| 185 | |
| 186 | void InGameOptions::begin() |
| 187 | { |
| 188 | /* Initialise all initial values */ |
| 189 | |
| 190 | menuform->findControlTyped<ScrollBar>("GLOBAL_GAIN_SLIDER") |
| 191 | ->setValue(config().getInt("Framework.Audio.GlobalGain")); |
| 192 | |
| 193 | menuform->findControlTyped<ScrollBar>("MUSIC_GAIN_SLIDER") |
| 194 | ->setValue(config().getInt("Framework.Audio.MusicGain")); |
| 195 | |
| 196 | menuform->findControlTyped<ScrollBar>("SAMPLE_GAIN_SLIDER") |
| 197 | ->setValue(config().getInt("Framework.Audio.SampleGain")); |
| 198 | |
| 199 | menuform->findControlTyped<CheckBox>("AUTO_SCROLL") |
| 200 | ->setChecked(config().getBool("Options.Misc.AutoScroll")); |
| 201 | menuform->findControlTyped<CheckBox>("TOOL_TIPS") |
| 202 | ->setChecked(config().getInt("Options.Misc.ToolTipDelay") > 0); |
| 203 | menuform->findControlTyped<CheckBox>("ACTION_MUSIC") |
| 204 | ->setChecked(config().getBool("Options.Misc.ActionMusic")); |
| 205 | menuform->findControlTyped<CheckBox>("AUTO_EXECUTE_ORDERS") |
| 206 | ->setChecked(config().getBool("Options.Misc.AutoExecute")); |
| 207 | |
| 208 | if (state->current_battle) |
| 209 | { |
| 210 | menuform->findControlTyped<TextButton>("BUTTON_EXIT_BATTLE")->setVisible(true); |
| 211 | menuform->findControlTyped<TextButton>("BUTTON_SKIRMISH")->setVisible(false); |
| 212 | } |
| 213 | else |
| 214 | { |
| 215 | menuform->findControlTyped<TextButton>("BUTTON_EXIT_BATTLE")->setVisible(false); |
| 216 | menuform->findControlTyped<TextButton>("BUTTON_SKIRMISH")->setVisible(true); |
| 217 | } |
| 218 | |
| 219 | menuform->findControlTyped<Label>("TEXT_FUNDS")->setText(state->getPlayerBalance()); |
| 220 | |
| 221 | loadList(0); |
| 222 | } |
| 223 | |
| 224 | void InGameOptions::pause() {} |
| 225 |
nothing calls this directly
no test coverage detected