Save options before leaving options screen

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7026 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-12-15 00:23:42 +00:00
parent c494e5037f
commit 5478aac7ca
2 changed files with 12 additions and 0 deletions

View File

@ -83,6 +83,15 @@ void OptionsScreenAudio::init()
// -----------------------------------------------------------------------------
void OptionsScreenAudio::tearDown()
{
Screen::tearDown();
// save changes when leaving screen
user_config->saveConfig();
} // tearDown
// -----------------------------------------------------------------------------
void OptionsScreenAudio::eventCallback(Widget* widget, const std::string& name, const int playerID)
{
if (name == "options_choice")

View File

@ -48,6 +48,9 @@ public:
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void init();
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void tearDown();
/** \brief implement optional callback from parent class GUIEngine::Screen */
virtual void unloaded();
};