Apparently the onEscapePressed callback for a dialog didn't operate as advertised. I fiex.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13306 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
3a630d4985
commit
dea145952b
@ -105,7 +105,7 @@ namespace GUIEngine
|
||||
static bool isADialogActive();
|
||||
|
||||
/** Override to change what happens on escape pressed */
|
||||
virtual void escapePressed() { dismiss(); }
|
||||
virtual bool onEscapePressed() { return true; }
|
||||
|
||||
/** Override to be notified of updates */
|
||||
virtual void onUpdate(float dt) { }
|
||||
|
@ -167,7 +167,8 @@ void StateManager::escapePressed()
|
||||
// when another modal dialog is visible
|
||||
else if(ModalDialog::isADialogActive())
|
||||
{
|
||||
ModalDialog::getCurrent()->escapePressed();
|
||||
if(ModalDialog::getCurrent()->onEscapePressed())
|
||||
ModalDialog::getCurrent()->dismiss();
|
||||
}
|
||||
// In-game
|
||||
else if(m_game_mode == GAME)
|
||||
|
Loading…
Reference in New Issue
Block a user