diff options
author | Paul Gilbert | 2015-07-20 21:58:05 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-20 21:58:05 -0400 |
commit | a28d34b7b988834dfb45e2e3a8027f2dd69983df (patch) | |
tree | 7a2e797673c65ac08d8e8ca62835ece40e96f229 /engines/sherlock/tattoo | |
parent | 4a738f972a79f905cb6190925519f3ab4938c576 (diff) | |
download | scummvm-rg350-a28d34b7b988834dfb45e2e3a8027f2dd69983df.tar.gz scummvm-rg350-a28d34b7b988834dfb45e2e3a8027f2dd69983df.tar.bz2 scummvm-rg350-a28d34b7b988834dfb45e2e3a8027f2dd69983df.zip |
SHERLOCK: RT: Fix showing tooltips for solid objects in lab scene
Diffstat (limited to 'engines/sherlock/tattoo')
-rw-r--r-- | engines/sherlock/tattoo/tattoo_scene.cpp | 11 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_user_interface.cpp | 2 |
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(); } |