diff options
author | Paul Gilbert | 2015-07-09 20:15:29 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-09 20:15:29 -0400 |
commit | 6fe1b6757adb7c75ffe5c0ba4fcd442a279d03f4 (patch) | |
tree | 44ccb4947e4bf3323f39c54b995268468f79f06d | |
parent | 903875f0fea005adf9e47be59c3480714775ab9c (diff) | |
download | scummvm-rg350-6fe1b6757adb7c75ffe5c0ba4fcd442a279d03f4.tar.gz scummvm-rg350-6fe1b6757adb7c75ffe5c0ba4fcd442a279d03f4.tar.bz2 scummvm-rg350-6fe1b6757adb7c75ffe5c0ba4fcd442a279d03f4.zip |
SHERLOCK: RT: Fix right-clicking other objects when Verbs menu is open
-rw-r--r-- | engines/sherlock/tattoo/widget_verbs.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/sherlock/tattoo/widget_verbs.cpp b/engines/sherlock/tattoo/widget_verbs.cpp index 81213b763a..dd6637b6cb 100644 --- a/engines/sherlock/tattoo/widget_verbs.cpp +++ b/engines/sherlock/tattoo/widget_verbs.cpp @@ -47,8 +47,8 @@ void WidgetVerbs::load(bool objectsOn) { if (talk._talkToAbort) return; + ui._activeObj = ui._bgFound; _outsideMenu = false; - _verbCommands.clear(); // Check if we need to show options for the highlighted object @@ -176,20 +176,17 @@ void WidgetVerbs::handleEvents() { // See if they want to close the menu (they clicked outside of the menu) if (!_bounds.contains(mousePos)) { if (_outsideMenu) { - // Free the current menu graphics & erase the menu - banishWindow(); - if (events._rightReleased) { - // Reset the selected shape to what was clicked on + // Change to the item (if any) that was right-clicked on, and re-draw the verb menu ui._bgFound = scene.findBgShape(mousePos); ui._personFound = ui._bgFound >= 1000; - Object *_bgShape = ui._personFound ? nullptr : &scene._bgShapes[ui._bgFound]; + ui._bgShape = ui._personFound || ui._bgFound == -1 ? nullptr : &scene._bgShapes[ui._bgFound]; if (ui._personFound) { if (people[ui._bgFound - 1000]._description.empty() || people[ui._bgFound - 1000]._description.hasPrefix(" ")) noDesc = true; } else if (ui._bgFound != -1) { - if (_bgShape->_description.empty() || _bgShape->_description.hasPrefix(" ")) + if (ui._bgShape->_description.empty() || ui._bgShape->_description.hasPrefix(" ")) noDesc = true; } else { noDesc = true; @@ -198,6 +195,9 @@ void WidgetVerbs::handleEvents() { // Call the Routine to turn on the Commands for this Object load(!noDesc); } else { + // Free the current menu graphics & erase the menu + banishWindow(); + // See if we're in a Lab Table Room ui._menuMode = scene._labTableScene ? LAB_MODE : STD_MODE; } |