aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sherlock/events.cpp2
-rw-r--r--engines/sherlock/events.h1
-rw-r--r--engines/sherlock/tattoo/widget_inventory.cpp4
3 files changed, 7 insertions, 0 deletions
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index c57abc7291..a8912f6f1e 100644
--- a/engines/sherlock/events.cpp
+++ b/engines/sherlock/events.cpp
@@ -89,6 +89,8 @@ void Events::setCursor(CursorId cursorId) {
void Events::setCursor(const Graphics::Surface &src, int hotspotX, int hotspotY) {
_cursorId = INVALID_CURSOR;
+ _hotspotPos = Common::Point(hotspotX, hotspotY);
+
if (!IS_3DO) {
// PC 8-bit palettized
CursorMan.replaceCursor(src.getPixels(), src.w, src.h, hotspotX, hotspotY, 0xff);
diff --git a/engines/sherlock/events.h b/engines/sherlock/events.h
index 6932f21c98..93a5e54f81 100644
--- a/engines/sherlock/events.h
+++ b/engines/sherlock/events.h
@@ -59,6 +59,7 @@ public:
bool _oldRightButton;
bool _firstPress;
Common::Stack<Common::KeyState> _pendingKeys;
+ Common::Point _hotspotPos;
public:
Events(SherlockEngine *vm);
~Events();
diff --git a/engines/sherlock/tattoo/widget_inventory.cpp b/engines/sherlock/tattoo/widget_inventory.cpp
index 52ab5bf23f..9afe841fa9 100644
--- a/engines/sherlock/tattoo/widget_inventory.cpp
+++ b/engines/sherlock/tattoo/widget_inventory.cpp
@@ -230,6 +230,10 @@ void WidgetInventoryTooltip::handleEvents() {
return;
}
+ if (_owner->_invVerbMode == 3)
+ // Adjust tooltip to be above the inventory item being shown above the standard cursor
+ mousePos.y -= events._hotspotPos.y;
+
// Update the position of the tooltip
int xs = CLIP(mousePos.x - _bounds.width() / 2, 0, SHERLOCK_SCENE_WIDTH - _bounds.width());
int ys = CLIP(mousePos.y - _bounds.height(), 0, SHERLOCK_SCREEN_HEIGHT - _bounds.height());