aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;