aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-07-20 21:58:05 -0400
committerPaul Gilbert2015-07-20 21:58:05 -0400
commita28d34b7b988834dfb45e2e3a8027f2dd69983df (patch)
tree7a2e797673c65ac08d8e8ca62835ece40e96f229
parent4a738f972a79f905cb6190925519f3ab4938c576 (diff)
downloadscummvm-rg350-a28d34b7b988834dfb45e2e3a8027f2dd69983df.tar.gz
scummvm-rg350-a28d34b7b988834dfb45e2e3a8027f2dd69983df.tar.bz2
scummvm-rg350-a28d34b7b988834dfb45e2e3a8027f2dd69983df.zip
SHERLOCK: RT: Fix showing tooltips for solid objects in lab scene
-rw-r--r--engines/sherlock/tattoo/tattoo_scene.cpp11
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.cpp2
2 files changed, 12 insertions, 1 deletions
diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp
index a171da10cc..ba462ca255 100644
--- a/engines/sherlock/tattoo/tattoo_scene.cpp
+++ b/engines/sherlock/tattoo/tattoo_scene.cpp
@@ -725,6 +725,17 @@ int TattooScene::findBgShape(const Common::Point &pt) {
int result = Scene::findBgShape(pt);
if (result == -1) {
+ if (_labTableScene) {
+ // Check for SOLID objects in the lab scene
+ for (int idx = (int)_bgShapes.size() - 1; idx >= 0; --idx) {
+ Object &o = _bgShapes[idx];
+ if (o._type != INVALID && o._type != NO_SHAPE && o._type != HIDDEN && o._aType == SOLID) {
+ if (o.getNewBounds().contains(pt))
+ return idx;
+ }
+ }
+ }
+
// No shape found, so check whether a character is highlighted
for (int idx = 1; idx < MAX_CHARACTERS && result == -1; ++idx) {
Person &person = people[idx];
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index e846db2701..04be008587 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.cpp
+++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp
@@ -308,7 +308,7 @@ void TattooUserInterface::drawInterface(int bufferNum) {
screen.blockMove();
// Handle drawing the text tooltip if necessary
- if (_menuMode == STD_MODE)
+ if (_menuMode == STD_MODE || _menuMode == LAB_MODE)
_tooltipWidget.draw();
}