[Scummvm-cvs-logs] scummvm master -> af8dbfc998702cf02ec79df73fcf7221c4b8a2a0

m-kiewitz m_kiewitz at users.sourceforge.net
Thu Feb 4 16:42:13 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
af8dbfc998 AGI: More accurate menu mouse support


Commit: af8dbfc998702cf02ec79df73fcf7221c4b8a2a0
    https://github.com/scummvm/scummvm/commit/af8dbfc998702cf02ec79df73fcf7221c4b8a2a0
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-02-04T16:42:41+01:00

Commit Message:
AGI: More accurate menu mouse support

Menu items did not switch to inverted state when they are disabled.

Changed paths:
    engines/agi/menu.cpp



diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp
index f154472..803efd7 100644
--- a/engines/agi/menu.cpp
+++ b/engines/agi/menu.cpp
@@ -600,11 +600,10 @@ void GfxMenu::mouseEvent(uint16 newKey) {
 		// User has stopped pressing the mouse button, if any item number is selected -> execute it
 		if (activeItemNr >= 0) {
 			GuiMenuItemEntry *itemEntry = _itemArray[activeItemNr];
-			if (!itemEntry->enabled)
-				return;
-
-			// Trigger controller
-			_vm->_game.controllerOccured[itemEntry->controllerSlot] = true;
+			if (itemEntry->enabled) {
+				// Trigger controller
+				_vm->_game.controllerOccured[itemEntry->controllerSlot] = true;
+			}
 		}
 
 		_vm->cycleInnerLoopInactive(); // exit execute-loop
@@ -645,9 +644,12 @@ void GfxMenu::mouseFindMenuSelection(int16 mouseRow, int16 mouseColumn, int16 &a
 				// line match
 				if ((mouseColumn >= itemEntry->column) && (mouseColumn <= (itemEntry->column + itemEntry->textLen))) {
 					// full match
-					activeMenuNr = _drawnMenuNr;
-					activeMenuItemNr = itemNr;
-					return;
+					if (itemEntry->enabled) {
+						// Only see it, when it's currently enabled
+						activeMenuNr = _drawnMenuNr;
+						activeMenuItemNr = itemNr;
+						return;
+					}
 				}
 			}
 			itemNr++;






More information about the Scummvm-git-logs mailing list