aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorMartin Kiewitz2016-02-04 16:42:41 +0100
committerMartin Kiewitz2016-02-04 16:42:41 +0100
commitaf8dbfc998702cf02ec79df73fcf7221c4b8a2a0 (patch)
tree56595015c062b2133c93d5d079b21ff488afa100 /engines/agi
parent9620979def331f89423f9e0bb0996805e7faa207 (diff)
downloadscummvm-rg350-af8dbfc998702cf02ec79df73fcf7221c4b8a2a0.tar.gz
scummvm-rg350-af8dbfc998702cf02ec79df73fcf7221c4b8a2a0.tar.bz2
scummvm-rg350-af8dbfc998702cf02ec79df73fcf7221c4b8a2a0.zip
AGI: More accurate menu mouse support
Menu items did not switch to inverted state when they are disabled.
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/menu.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp
index f154472aa8..803efd757e 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++;