diff options
author | Paul Gilbert | 2011-05-15 22:56:59 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-05-16 20:13:37 +1000 |
commit | 67f8a8b346d233d5e1e0aae67e20a3b2613eade3 (patch) | |
tree | c88037d32ce78df40dfbe51cff2d23c075c082b7 /engines/tsage | |
parent | 98c4d739f2820e174e40b9da37cb37940781e417 (diff) | |
download | scummvm-rg350-67f8a8b346d233d5e1e0aae67e20a3b2613eade3.tar.gz scummvm-rg350-67f8a8b346d233d5e1e0aae67e20a3b2613eade3.tar.bz2 scummvm-rg350-67f8a8b346d233d5e1e0aae67e20a3b2613eade3.zip |
TSAGE: Implemented the Exit dialog in the Ringworld demo
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/ringworld_demo.cpp | 5 | ||||
-rw-r--r-- | engines/tsage/ringworld_demo.h | 1 | ||||
-rw-r--r-- | engines/tsage/staticres.cpp | 3 | ||||
-rw-r--r-- | engines/tsage/staticres.h | 5 |
4 files changed, 14 insertions, 0 deletions
diff --git a/engines/tsage/ringworld_demo.cpp b/engines/tsage/ringworld_demo.cpp index 2dacea660a..5db2a89b59 100644 --- a/engines/tsage/ringworld_demo.cpp +++ b/engines/tsage/ringworld_demo.cpp @@ -39,6 +39,11 @@ Scene *RingworldDemoGame::createScene(int sceneNumber) { return new RingworldDemoScene(); } +void RingworldDemoGame::quitGame() { + if (MessageDialog::show(DEMO_EXIT_MSG, EXIT_BTN_STRING, DEMO_BTN_STRING) == 0) + _vm->quitGame(); +} + /*-------------------------------------------------------------------------- * Ringworld Demo scene * diff --git a/engines/tsage/ringworld_demo.h b/engines/tsage/ringworld_demo.h index 8b69da8f43..34bfb4f3b1 100644 --- a/engines/tsage/ringworld_demo.h +++ b/engines/tsage/ringworld_demo.h @@ -35,6 +35,7 @@ class RingworldDemoGame: public Game { public: virtual void start(); virtual Scene *createScene(int sceneNumber); + virtual void quitGame(); }; class RingworldDemoScene: public Scene { diff --git a/engines/tsage/staticres.cpp b/engines/tsage/staticres.cpp index 6c2d92497e..851d1687b1 100644 --- a/engines/tsage/staticres.cpp +++ b/engines/tsage/staticres.cpp @@ -113,5 +113,8 @@ Wait for it's return in the lander bay."; const char *DEMO_HELP_MSG = " Help...\rF2 - Sound Options\rF3 - Exit demo\r\rPress ENTER\rto continue"; const char *DEMO_PAUSED_MSG = " demo is paused"; +const char *DEMO_EXIT_MSG = "Press ENTER to resume the Ringworld\x14 demo. Press ESC to exit"; +const char *EXIT_BTN_STRING = "Exit"; +const char *DEMO_BTN_STRING = "Demo"; } // End of namespace tSage diff --git a/engines/tsage/staticres.h b/engines/tsage/staticres.h index bed9e0dce0..d60e11add8 100644 --- a/engines/tsage/staticres.h +++ b/engines/tsage/staticres.h @@ -79,6 +79,11 @@ extern const char *SCENE6100_VERY_WELL; // Demo messages extern const char *DEMO_HELP_MSG; extern const char *DEMO_PAUSED_MSG; +extern const char *DEMO_HELP_MSG; +extern const char *DEMO_PAUSED_MSG; +extern const char *DEMO_EXIT_MSG; +extern const char *EXIT_BTN_STRING; +extern const char *DEMO_BTN_STRING; } // End of namespace tSage |