online highscore can now be selected from Options menu
This commit is contained in:
+18
-1
@@ -928,8 +928,25 @@ void View::DrawUiOptions() {
|
||||
Engine::SetMusicVolume(music_volume);
|
||||
}
|
||||
|
||||
bool use_online_mode = Model::UseServerHighscore.GetBoolValue();
|
||||
|
||||
if (Engine::GUI::Button (5, "Back", screen_right * 0.5 - 100, 380, button_width, button_height)
|
||||
std::string online_button_caption;
|
||||
if (use_online_mode) {
|
||||
online_button_caption = "Highscore: online";
|
||||
} else {
|
||||
online_button_caption = "Highscore: offline";
|
||||
}
|
||||
|
||||
if (Engine::GUI::CheckButton (12, online_button_caption.c_str(), use_online_mode,
|
||||
screen_right*0.5 - 130, 360,
|
||||
300, button_height)) {
|
||||
if (use_online_mode)
|
||||
Model::UseServerHighscore.Set("no");
|
||||
else
|
||||
Model::UseServerHighscore.Set("yes");
|
||||
}
|
||||
|
||||
if (Engine::GUI::Button (5, "Back", screen_right * 0.5 - 100, 480, button_width, button_height)
|
||||
|| Engine::GUI::CheckKeyPressed(SDLK_ESCAPE) ) {
|
||||
PopViewState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user