[Scummvm-cvs-logs] SF.net SVN: scummvm:[45853] scummvm/trunk/engines/sci/gui/gui_menu.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Thu Nov 12 09:29:00 CET 2009


Revision: 45853
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45853&view=rev
Author:   m_kiewitz
Date:     2009-11-12 08:28:59 +0000 (Thu, 12 Nov 2009)

Log Message:
-----------
SCI/newgui: changed behaviour of menu when left/right to follow sierra. Added other differences in implementation, added reanimate TODOs, added mouse interaction TODO

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gui/gui_menu.cpp

Modified: scummvm/trunk/engines/sci/gui/gui_menu.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_menu.cpp	2009-11-12 07:41:33 UTC (rev 45852)
+++ scummvm/trunk/engines/sci/gui/gui_menu.cpp	2009-11-12 08:28:59 UTC (rev 45853)
@@ -382,6 +382,7 @@
 	if (!_menuSaveHandle.isNull()) {
 		_gfx->BitsRestore(_menuSaveHandle);
 		_gfx->BitsShow(_menuRect);
+		// TODO: Change to ReAnimate()
 	}
 	if (!_barSaveHandle.isNull()) {
 		_gfx->BitsRestore(_barSaveHandle);
@@ -443,6 +444,7 @@
 	if (!_menuSaveHandle.isNull()) {
 		_gfx->BitsRestore(_menuSaveHandle);
 		_gfx->BitsShow(_menuRect);
+		// TODO: Change to ReAnimate()
 	}
 
 	// First calculate rect of menu and also invert old and new menu text
@@ -539,6 +541,8 @@
 	GuiMenuItemEntry *curItemEntry = findItem(_curMenuId, _curItemId);
 	GuiMenuItemEntry *newItemEntry = curItemEntry;
 
+	// We don't 100% follow sierra here: we select last item instead of selecting first item of first menu everytime
+
 	calculateTextWidth();
 	_oldPort = _gfx->SetPort(_gfx->_menuPort);
 	_barSaveHandle = _gfx->BitsSave(_gfx->_menuBarRect, SCI_SCREEN_MASK_VISUAL);
@@ -557,7 +561,8 @@
 
 		switch (curEvent.type) {
 		case SCI_EVT_KEYBOARD:
-			// We don't 100% follow sierra here, sierra actually changed itemId to 1 on menuId changes
+			// We don't 100% follow sierra here: - sierra didn't wrap around when changing item id
+			//									 - sierra allowed item id to be 0, which didnt make any sense
 			do {
 				switch (curEvent.data) {
 				case SCI_K_ESC:
@@ -567,10 +572,10 @@
 					_curMenuId = curItemEntry->menuId; _curItemId = curItemEntry->id;
 					return curItemEntry;
 				case SCI_K_LEFT:
-					newMenuId--;
+					newMenuId--; newItemId = 1;
 					break;
 				case SCI_K_RIGHT:
-					newMenuId++;
+					newMenuId++; newItemId = 1;
 					break;
 				case SCI_K_UP:
 					newItemId--;
@@ -616,6 +621,8 @@
 GuiMenuItemEntry *SciGuiMenu::interactiveWithMouse() {
 	calculateTextWidth();
 
+	// TODO
+
 	return NULL;
 }
 


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