aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2011-05-16 20:12:59 +1000
committerPaul Gilbert2011-05-16 20:17:02 +1000
commitf1e3bb92b904fc79484c198354b750749577426b (patch)
treeae311c46476173b6ad3c2f28ef2c9278334d093e
parentd610b40f7832f0502c796ccf44e192ac1e93b5dc (diff)
downloadscummvm-rg350-f1e3bb92b904fc79484c198354b750749577426b.tar.gz
scummvm-rg350-f1e3bb92b904fc79484c198354b750749577426b.tar.bz2
scummvm-rg350-f1e3bb92b904fc79484c198354b750749577426b.zip
TSAGE: Changed demo quit dialog to correctly handle ESCAPE and ENTER keys
-rw-r--r--engines/tsage/ringworld_demo.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/engines/tsage/ringworld_demo.cpp b/engines/tsage/ringworld_demo.cpp
index 5db2a89b59..6213ec42ce 100644
--- a/engines/tsage/ringworld_demo.cpp
+++ b/engines/tsage/ringworld_demo.cpp
@@ -40,7 +40,17 @@ Scene *RingworldDemoGame::createScene(int sceneNumber) {
}
void RingworldDemoGame::quitGame() {
- if (MessageDialog::show(DEMO_EXIT_MSG, EXIT_BTN_STRING, DEMO_BTN_STRING) == 0)
+ _globals->_events.setCursor(CURSOR_ARROW);
+ MessageDialog *dlg = new MessageDialog(DEMO_EXIT_MSG, EXIT_BTN_STRING, DEMO_BTN_STRING);
+ dlg->draw();
+
+ GfxButton *selectedButton = dlg->execute(&dlg->_btn2);
+ bool exitFlag = selectedButton != &dlg->_btn2;
+
+ delete dlg;
+ _globals->_events.hideCursor();
+
+ if (exitFlag)
_vm->quitGame();
}