aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorFlorian Kagerer2009-06-15 21:39:43 +0000
committerFlorian Kagerer2009-06-15 21:39:43 +0000
commit650f3a50d2acd1962501e9082e946e7ffa13ae13 (patch)
tree238a803428cbbddf6c2be1a29b4a7656c818f520 /engines/kyra
parent2f8a0b9936b7d63421f822ec4493cde87d2ab415 (diff)
downloadscummvm-rg350-650f3a50d2acd1962501e9082e946e7ffa13ae13.tar.gz
scummvm-rg350-650f3a50d2acd1962501e9082e946e7ffa13ae13.tar.bz2
scummvm-rg350-650f3a50d2acd1962501e9082e946e7ffa13ae13.zip
LOL: implemented quit menu
svn-id: r41560
Diffstat (limited to 'engines/kyra')
-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