diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-07-13 12:38:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-07-13 12:38:09 +0300 |
commit | 927c411f815131a03eea065231d043692465c573 (patch) | |
tree | 18f22fffd864d356b5b4ae0dbefaa74587762eb3 /src/game.cpp | |
parent | 17b582cf14f6bb1f8f813b0753e9d7049d834799 (diff) | |
download | manaplus-927c411f815131a03eea065231d043692465c573.tar.gz manaplus-927c411f815131a03eea065231d043692465c573.tar.bz2 manaplus-927c411f815131a03eea065231d043692465c573.tar.xz manaplus-927c411f815131a03eea065231d043692465c573.zip |
Close popup menu by quit key (ESC).
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp index 0082040dc..259317545 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -754,8 +754,15 @@ void Game::handleInput() case KeyboardConfig::KEY_QUIT: if (!chatWindow->isInputFocused()) { - quitDialog = new QuitDialog(&quitDialog); - quitDialog->requestMoveToTop(); + if (viewport && viewport->isPopupMenuVisible()) + { + viewport->closePopupMenu(); + } + else + { + quitDialog = new QuitDialog(&quitDialog); + quitDialog->requestMoveToTop(); + } return; } break; |