diff options
author | Paul Gilbert | 2015-07-25 14:24:05 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-25 14:24:05 -0400 |
commit | 9e545df252e92a13bc135e0733d5a3148d6220a6 (patch) | |
tree | 8613d5ea48269f6dd83db405873a9f74cae13955 /engines/sherlock/tattoo | |
parent | cb9aab65b0b49770f3552bbe001be012d45827e6 (diff) | |
download | scummvm-rg350-9e545df252e92a13bc135e0733d5a3148d6220a6.tar.gz scummvm-rg350-9e545df252e92a13bc135e0733d5a3148d6220a6.tar.bz2 scummvm-rg350-9e545df252e92a13bc135e0733d5a3148d6220a6.zip |
SHERLOCK: RT: Generalise code for joining cursor and images as a cursor
Diffstat (limited to 'engines/sherlock/tattoo')
-rw-r--r-- | engines/sherlock/tattoo/widget_inventory.cpp | 2 | ||||
-rw-r--r-- | engines/sherlock/tattoo/widget_lab.cpp | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/sherlock/tattoo/widget_inventory.cpp b/engines/sherlock/tattoo/widget_inventory.cpp index 170fb02481..c2de61fda8 100644 --- a/engines/sherlock/tattoo/widget_inventory.cpp +++ b/engines/sherlock/tattoo/widget_inventory.cpp @@ -428,7 +428,7 @@ void WidgetInventoryVerbs::handleEvents() { if (ui._menuMode == INV_MODE) { // Add the inventory item to the cursor ImageFrame &imgFrame = (*inv._invShapes[_owner->_invSelect - inv._invIndex])[0]; - events.setCursor(ARROW, imgFrame._frame); + events.setCursor(ARROW, Common::Point(-100, imgFrame._height), imgFrame._frame); // Close the inventory dialog without banishing it, so it can keep getting events // to handle tooltips and actually making the selection of what object to use them item on diff --git a/engines/sherlock/tattoo/widget_lab.cpp b/engines/sherlock/tattoo/widget_lab.cpp index 5824977e04..2572b7a693 100644 --- a/engines/sherlock/tattoo/widget_lab.cpp +++ b/engines/sherlock/tattoo/widget_lab.cpp @@ -42,6 +42,8 @@ void WidgetLab::handleEvents() { Events &events = *_vm->_events; Scene &scene = *_vm->_scene; TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui; + Common::Point mousePos = events.mousePos(); + WidgetBase::handleEvents(); bool noDesc = false; @@ -146,7 +148,9 @@ void WidgetLab::handleEvents() { // Set the mouse cursor to the object Graphics::Surface &img = _labObject->_imageFrame->_frame; - events.setCursor(img, img.w / 2, img.h / 2); + Common::Point cursorOffset = mousePos - _labObject->_position; + events.setCursor(ARROW, cursorOffset, img); + warning("%d,%d", cursorOffset.x, cursorOffset.y);//**DEBUG**** // Hide this object until they are done with it (releasing it) _labObject->toggleHidden(); |