diff options
author | Filippos Karapetis | 2014-12-26 13:14:24 +0200 |
---|---|---|
committer | Filippos Karapetis | 2014-12-26 13:14:24 +0200 |
commit | eea1ee445fcac7ecc53e31d258aac697d6b242f1 (patch) | |
tree | 2caaf9a3201cc4abfd80b6d5fdc20d04d0a7cac9 /engines/zvision/core/events.cpp | |
parent | e8820d26e7d673f96c416f93dd16811107e94cb4 (diff) | |
download | scummvm-rg350-eea1ee445fcac7ecc53e31d258aac697d6b242f1.tar.gz scummvm-rg350-eea1ee445fcac7ecc53e31d258aac697d6b242f1.tar.bz2 scummvm-rg350-eea1ee445fcac7ecc53e31d258aac697d6b242f1.zip |
ZVISION: Move more graphics code out of the main engine code
Diffstat (limited to 'engines/zvision/core/events.cpp')
-rw-r--r-- | engines/zvision/core/events.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/engines/zvision/core/events.cpp b/engines/zvision/core/events.cpp index 70fd425949..5f29a6879c 100644 --- a/engines/zvision/core/events.cpp +++ b/engines/zvision/core/events.cpp @@ -30,6 +30,7 @@ #include "zvision/scripting/script_manager.h" #include "zvision/scripting/menu.h" #include "zvision/sound/zork_raw.h" +#include "zvision/text/string_manager.h" #include "common/events.h" #include "common/system.h" @@ -70,19 +71,19 @@ void ZVision::shortKeys(Common::Event event) { if (event.kbd.hasFlags(Common::KBD_CTRL)) { switch (event.kbd.keycode) { case Common::KEYCODE_s: - if (getMenuBarEnable() & kMenubarSave) + if (_menu->getEnable() & kMenubarSave) _scriptManager->changeLocation('g', 'j', 's', 'e', 0); break; case Common::KEYCODE_r: - if (getMenuBarEnable() & kMenubarRestore) + if (_menu->getEnable() & kMenubarRestore) _scriptManager->changeLocation('g', 'j', 'r', 'e', 0); break; case Common::KEYCODE_p: - if (getMenuBarEnable() & kMenubarSettings) + if (_menu->getEnable() & kMenubarSettings) _scriptManager->changeLocation('g', 'j', 'p', 'e', 0); break; case Common::KEYCODE_q: - if (getMenuBarEnable() & kMenubarExit) + if (_menu->getEnable() & kMenubarExit) ifQuit(); break; default: @@ -482,4 +483,12 @@ uint8 ZVision::getZvisionKey(Common::KeyCode scummKeyCode) { return 0; } +bool ZVision::ifQuit() { + if (_renderManager->askQuestion(_stringManager->getTextLine(StringManager::ZVISION_STR_EXITPROMT))) { + quitGame(); + return true; + } + return false; +} + } // End of namespace ZVision |