[Scummvm-cvs-logs] scummvm master -> 6fe1b6757adb7c75ffe5c0ba4fcd442a279d03f4

dreammaster dreammaster at scummvm.org
Fri Jul 10 02:16:29 CEST 2015


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:
6fe1b6757a SHERLOCK: RT: Fix right-clicking other objects when Verbs menu is open


Commit: 6fe1b6757adb7c75ffe5c0ba4fcd442a279d03f4
    https://github.com/scummvm/scummvm/commit/6fe1b6757adb7c75ffe5c0ba4fcd442a279d03f4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-07-09T20:15:29-04:00

Commit Message:
SHERLOCK: RT: Fix right-clicking other objects when Verbs menu is open

Changed paths:
    engines/sherlock/tattoo/widget_verbs.cpp



diff --git a/engines/sherlock/tattoo/widget_verbs.cpp b/engines/sherlock/tattoo/widget_verbs.cpp
index 81213b7..dd6637b 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;
 				}






More information about the Scummvm-git-logs mailing list