aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-03-30 18:41:11 +0000
committerJohannes Schickel2008-03-30 18:41:11 +0000
commit54d2e7128e709fd7c6cffc3720d309ae0d2a3edf (patch)
treec2bf1bce12576149b77a19743d4e8c6269904001
parent4a9891c006d5df160be59f624bccbab18d7380d2 (diff)
downloadscummvm-rg350-54d2e7128e709fd7c6cffc3720d309ae0d2a3edf.tar.gz
scummvm-rg350-54d2e7128e709fd7c6cffc3720d309ae0d2a3edf.tar.bz2
scummvm-rg350-54d2e7128e709fd7c6cffc3720d309ae0d2a3edf.zip
Implement quit flag handling in Kyra2 GUI code.
svn-id: r31336
-rw-r--r--engines/kyra/gui_v2.cpp10
-rw-r--r--engines/kyra/gui_v2.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 7ea0748cf0..cb1e1b5bde 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -1155,6 +1155,14 @@ int KyraEngine_v2::cauldronButton(Button *button) {
#pragma mark -
+void GUI_v2::getInput() {
+ _vm->checkInput(_menuButtonList);
+ if (_vm->quit()) {
+ _displayMenu = false;
+ _displaySubMenu = false;
+ }
+}
+
int GUI_v2::optionsButton(Button *button) {
_restartGame = false;
_reloadTemporarySave = false;
@@ -1348,7 +1356,7 @@ int GUI_v2::loadMenu(Button *caller) {
while (_displaySubMenu) {
Common::Point mouse = _vm->getMousePos();
processHighlights(_loadMenu, mouse.x, mouse.y);
- _vm->checkInput(_menuButtonList);
+ getInput();
}
if (_cancelSubMenu) {
diff --git a/engines/kyra/gui_v2.h b/engines/kyra/gui_v2.h
index 437586fbda..555014b195 100644
--- a/engines/kyra/gui_v2.h
+++ b/engines/kyra/gui_v2.h
@@ -106,6 +106,8 @@ public:
int optionsButton(Button *button);
private:
+ void getInput();
+
Button _menuButtons[7];
Button _scrollUpButton;
Button _scrollDownButton;