aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/gui_lol.cpp14
-rw-r--r--engines/kyra/gui_lol.h1
-rw-r--r--engines/kyra/staticres.cpp7
3 files changed, 21 insertions, 1 deletions
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index f61ac5416c..f9f320f1be 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -2405,7 +2405,8 @@ int GUI_LoL::clickedMainMenu(Button *button) {
//_newMenu = &_audioOptions;
break;
case 0x4006:
- //_newMenu = &_choiceMenu;
+ _choiceMenu.menuNameId = 0x400a;
+ _newMenu = &_choiceMenu;
break;
case 0x4005:
_displayMenu = false;
@@ -2442,6 +2443,17 @@ int GUI_LoL::clickedDeathMenu(Button *button) {
return 1;
}
+int GUI_LoL::clickedChoiceMenu(Button *button) {
+ updateMenuButton(button);
+ if (button->arg == _choiceMenu.item[0].itemId) {
+ if (_lastMenu == &_mainMenu)
+ _vm->quitGame();
+ } else if (button->arg == _choiceMenu.item[1].itemId) {
+ _newMenu = _lastMenu;
+ }
+ return 1;
+}
+
int GUI_LoL::scrollUp(Button *button) {
updateButton(button);
if (_savegameOffset > 0) {
diff --git a/engines/kyra/gui_lol.h b/engines/kyra/gui_lol.h
index e80d4af577..62f1c5ed9e 100644
--- a/engines/kyra/gui_lol.h
+++ b/engines/kyra/gui_lol.h
@@ -110,6 +110,7 @@ private:
int clickedMainMenu(Button *button);
int clickedLoadMenu(Button *button);
int clickedDeathMenu(Button *button);
+ int clickedChoiceMenu(Button *button);
int scrollUp(Button *button);
int scrollDown(Button *button);
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 4a9e3bdeac..341425172c 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -2046,6 +2046,13 @@ void GUI_LoL::initStaticData() {
Button::Callback deathMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedDeathMenu);
for (int i = 0; i < 2; ++i)
_deathMenu.item[i].callback = deathMenuFunctor;
+
+ GUI_LOL_MENU(_choiceMenu, 11, 0, 0, 2, -1, -1, -1, -1);
+ GUI_LOL_MENU_ITEM(_choiceMenu.item[0], 0x4007, 8, 30, 72, 15, 0, 0);
+ GUI_LOL_MENU_ITEM(_choiceMenu.item[1], 0x4008, 208, 30, 72, 15, 0, 0);
+ Button::Callback choiceMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedChoiceMenu);
+ for (int i = 0; i < 2; ++i)
+ _choiceMenu.item[i].callback = choiceMenuFunctor;
}
#endif // ENABLE_LOL