From: Ryan Flegel Date: Wed, 18 Jun 2008 05:25:04 +0000 (+0000) Subject: #232: Changing from menu language no longer freezes level. Level restart is still... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=675a7dc47a1f8efc33d2138b327c62f3cbcb0a79;p=supertux.git #232: Changing from menu language no longer freezes level. Level restart is still required for changes to take effect, though. SVN-Revision: 5585 --- diff --git a/src/gui/menu.hpp b/src/gui/menu.hpp index 60d48dd6d..6aaeb3ff8 100644 --- a/src/gui/menu.hpp +++ b/src/gui/menu.hpp @@ -100,13 +100,13 @@ private: static Menu* previous; static Menu* current_; - static void pop_current(); - public: /** Set the current menu, if pmenu is NULL, hide the current menu */ static void set_current(Menu* pmenu); static void push_current(Menu* pmenu); + static void pop_current(); + static void recalc_pos(); diff --git a/src/options_menu.cpp b/src/options_menu.cpp index c947101d3..ccadc447e 100644 --- a/src/options_menu.cpp +++ b/src/options_menu.cpp @@ -71,13 +71,13 @@ public: config->locale = ""; dictionary_manager.set_language(config->locale); config->save(); - Menu::set_current(0); + Menu::pop_current(); } else if (item->id == 1) { config->locale = "en"; dictionary_manager.set_language(config->locale); config->save(); - Menu::set_current(0); + Menu::pop_current(); } int mnid = 10; std::set languages = dictionary_manager.get_languages(); @@ -87,7 +87,7 @@ public: config->locale = locale_name; dictionary_manager.set_language(config->locale); config->save(); - Menu::set_current(0); + Menu::pop_current(); } } }