diff --git a/data/gui/screens/options_ui.stkgui b/data/gui/screens/options_ui.stkgui index e710a84fc..22056639a 100644 --- a/data/gui/screens/options_ui.stkgui +++ b/data/gui/screens/options_ui.stkgui @@ -53,6 +53,17 @@ +
+
+ +
+
+
+
+ + +
@@ -72,14 +83,6 @@ -
- - -
- - -
diff --git a/src/states_screens/options/options_screen_ui.cpp b/src/states_screens/options/options_screen_ui.cpp index b55491649..a846dd58b 100644 --- a/src/states_screens/options/options_screen_ui.cpp +++ b/src/states_screens/options/options_screen_ui.cpp @@ -103,6 +103,18 @@ void OptionsScreenUI::loadedFromFile() } minimap_options->m_properties[GUIEngine::PROP_MAX_VALUE] = "3"; + // Setup splitscreen spinner + GUIEngine::SpinnerWidget* splitscreen_method = getWidget("splitscreen_method"); + splitscreen_method->m_properties[PROP_WRAP_AROUND] = "true"; + splitscreen_method->clearLabels(); + //I18N: In the UI options, splitscreen_method in the race UI + splitscreen_method->addLabel( core::stringw(_("Vertical"))); + //I18N: In the UI options, splitscreen_method position in the race UI + splitscreen_method->addLabel( core::stringw(_("Horizontal"))); + splitscreen_method->m_properties[GUIEngine::PROP_MIN_VALUE] = "0"; + splitscreen_method->m_properties[GUIEngine::PROP_MAX_VALUE] = "1"; + + // Setup fontsize spinner GUIEngine::SpinnerWidget* font_size = getWidget("font_size"); assert( font_size != NULL ); @@ -228,17 +240,16 @@ void OptionsScreenUI::init() font_size->setActive(!in_game); // ---- video modes - CheckBoxWidget* splitscreen_method = getWidget("split_screen_horizontally"); - assert(splitscreen_method != NULL); - splitscreen_method->setState(UserConfigParams::split_screen_horizontally); + GUIEngine::SpinnerWidget* splitscreen_method = getWidget("splitscreen_method"); + assert( splitscreen_method != NULL ); + if (UserConfigParams::split_screen_horizontally) splitscreen_method->setValue(1); + else splitscreen_method->setValue(0); + splitscreen_method->setActive(!in_game); CheckBoxWidget* karts_powerup_gui = getWidget("karts_powerup_gui"); assert(karts_powerup_gui != NULL); karts_powerup_gui->setState(UserConfigParams::m_karts_powerup_gui); - //Forbid changing this setting in game - splitscreen_method->setActive(!in_game); - CheckBoxWidget* fps = getWidget("showfps"); assert( fps != NULL ); fps->setState( UserConfigParams::m_display_fps ); @@ -420,11 +431,11 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con font_size->setFocusForPlayer(PLAYER_ID_GAME_MASTER); font_size->setSelectedButton(right); } - else if (name == "split_screen_horizontally") + else if (name == "splitscreen_method") { - CheckBoxWidget* split_screen_horizontally = getWidget("split_screen_horizontally"); - assert(split_screen_horizontally != NULL); - UserConfigParams::split_screen_horizontally = split_screen_horizontally->getState(); + GUIEngine::SpinnerWidget* splitscreen_method = getWidget("splitscreen_method"); + assert( splitscreen_method != NULL ); + UserConfigParams::split_screen_horizontally = (splitscreen_method->getValue() == 1); } else if (name == "karts_powerup_gui") {