From 927c411f815131a03eea065231d043692465c573 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 13 Jul 2011 12:38:09 +0300 Subject: Close popup menu by quit key (ESC). --- src/game.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/game.cpp') 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; -- cgit v1.2.3-60-g2f50