diff --git a/src/states_screens/options/user_screen.cpp b/src/states_screens/options/user_screen.cpp index 87240da0a..5fad62fab 100644 --- a/src/states_screens/options/user_screen.cpp +++ b/src/states_screens/options/user_screen.cpp @@ -22,6 +22,7 @@ #include "challenges/unlock_manager.hpp" #include "config/player_manager.hpp" #include "config/user_config.hpp" +#include "graphics/central_settings.hpp" #include "guiengine/screen_keyboard.hpp" #include "guiengine/widgets/check_box_widget.hpp" #include "guiengine/widgets/dynamic_ribbon_widget.hpp" @@ -96,6 +97,13 @@ void BaseUserScreen::setNewAccountData(bool online, bool auto_login, m_password_tb->setText(password); } // setOnline +// ---------------------------------------------------------------------------- +void BaseUserScreen::beforeAddingWidget() +{ + getWidget("default_kart_color") + ->setVisible(CVS->isGLSL()); +} // beforeAddingWidget + // ---------------------------------------------------------------------------- /** Initialises the user screen. Searches for all players to fill the * list of users with their icons, and initialises all widgets for the @@ -156,7 +164,8 @@ void BaseUserScreen::init() getWidget("new_user")->setActive(!in_game); getWidget("rename")->setActive(!in_game); getWidget("delete")->setActive(!in_game); - getWidget("default_kart_color")->setActive(!in_game); + if (getWidget("default_kart_color")->isVisible()) + getWidget("default_kart_color")->setActive(!in_game); m_new_registered_data = false; if (m_auto_login) diff --git a/src/states_screens/options/user_screen.hpp b/src/states_screens/options/user_screen.hpp index bfc37e5e0..f7b1ff918 100644 --- a/src/states_screens/options/user_screen.hpp +++ b/src/states_screens/options/user_screen.hpp @@ -109,6 +109,9 @@ public: virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name, const int playerID) OVERRIDE; + /** \brief implement callback from parent class GUIEngine::Screen */ + virtual void beforeAddingWidget() OVERRIDE; + /** \brief implement callback from parent class GUIEngine::Screen */ virtual void init() OVERRIDE;