[Scummvm-cvs-logs] SF.net SVN: scummvm:[41560] scummvm/trunk/engines/kyra

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Mon Jun 15 23:39:43 CEST 2009


Revision: 41560
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41560&view=rev
Author:   athrxx
Date:     2009-06-15 21:39:43 +0000 (Mon, 15 Jun 2009)

Log Message:
-----------
LOL: implemented quit menu

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/gui_lol.cpp
    scummvm/trunk/engines/kyra/gui_lol.h
    scummvm/trunk/engines/kyra/staticres.cpp

Modified: scummvm/trunk/engines/kyra/gui_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_lol.cpp	2009-06-15 21:28:11 UTC (rev 41559)
+++ scummvm/trunk/engines/kyra/gui_lol.cpp	2009-06-15 21:39:43 UTC (rev 41560)
@@ -2405,7 +2405,8 @@
 		//_newMenu = &_audioOptions;
 		break;
 	case 0x4006:
-		//_newMenu = &_choiceMenu;
+		_choiceMenu.menuNameId = 0x400a;
+		_newMenu = &_choiceMenu;
 		break;
 	case 0x4005:
 		_displayMenu = false;
@@ -2442,6 +2443,17 @@
 	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) {

Modified: scummvm/trunk/engines/kyra/gui_lol.h
===================================================================
--- scummvm/trunk/engines/kyra/gui_lol.h	2009-06-15 21:28:11 UTC (rev 41559)
+++ scummvm/trunk/engines/kyra/gui_lol.h	2009-06-15 21:39:43 UTC (rev 41560)
@@ -110,6 +110,7 @@
 	int clickedMainMenu(Button *button);
 	int clickedLoadMenu(Button *button);
 	int clickedDeathMenu(Button *button);
+	int clickedChoiceMenu(Button *button);
 
 	int scrollUp(Button *button);
 	int scrollDown(Button *button);

Modified: scummvm/trunk/engines/kyra/staticres.cpp
===================================================================
--- scummvm/trunk/engines/kyra/staticres.cpp	2009-06-15 21:28:11 UTC (rev 41559)
+++ scummvm/trunk/engines/kyra/staticres.cpp	2009-06-15 21:39:43 UTC (rev 41560)
@@ -2046,6 +2046,13 @@
 	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


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list