Improved behavior when escape is pressed in a device config screen

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5362 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-05-03 17:18:47 +00:00
parent f60c6e7efb
commit a5a8b3ec87
2 changed files with 12 additions and 0 deletions

View File

@ -417,3 +417,12 @@ void OptionsScreenInput2::unloaded()
{ {
} }
// -----------------------------------------------------------------------------
bool OptionsScreenInput2::onEscapePressed()
{
StateManager::get()->replaceTopMostScreen(OptionsScreenInput::getInstance());
return false; // don't use standard escape key handler, we handled it differently
}
// -----------------------------------------------------------------------------

View File

@ -63,6 +63,9 @@ public:
/** \brief implement callback from parent class GUIEngine::Screen */ /** \brief implement callback from parent class GUIEngine::Screen */
virtual void tearDown(); virtual void tearDown();
/** \brief implement optional callback from parent class GUIEngine::Screen */
virtual bool onEscapePressed();
/** /**
* \brief invoke in "input sensing" mode, when input was sensed. * \brief invoke in "input sensing" mode, when input was sensed.
* Updates the input bindings accordingly with the sensed input. * Updates the input bindings accordingly with the sensed input.