aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo/widget_inventory.h
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-29 07:51:25 -0400
committerPaul Gilbert2015-06-29 07:51:25 -0400
commit753a810070b6b96d1a90cff399a41f21c31de885 (patch)
treebc84181d34cc8c7a4d9a2e5f12732fd38776133e /engines/sherlock/tattoo/widget_inventory.h
parent4c28682bcd4b5e2c268cfd57d8bb62fb51ebf8d3 (diff)
downloadscummvm-rg350-753a810070b6b96d1a90cff399a41f21c31de885.tar.gz
scummvm-rg350-753a810070b6b96d1a90cff399a41f21c31de885.tar.bz2
scummvm-rg350-753a810070b6b96d1a90cff399a41f21c31de885.zip
SHERLOCK: RT: Beginnings of inventory window tooltip class
Diffstat (limited to 'engines/sherlock/tattoo/widget_inventory.h')
-rw-r--r--engines/sherlock/tattoo/widget_inventory.h34
1 files changed, 28 insertions, 6 deletions
diff --git a/engines/sherlock/tattoo/widget_inventory.h b/engines/sherlock/tattoo/widget_inventory.h
index 41930779bc..41ba142c53 100644
--- a/engines/sherlock/tattoo/widget_inventory.h
+++ b/engines/sherlock/tattoo/widget_inventory.h
@@ -35,7 +35,34 @@ namespace Tattoo {
#define NUM_INVENTORY_SHOWN 8 // Number of Inventory Items Shown
+class WidgetInventory;
+
+class WidgetInventoryTooltip: public WidgetBase {
+private:
+ WidgetInventory *_owner;
+ Common::Rect _oldInvGraphicBounds, _invGraphicBounds;
+protected:
+ /**
+ * Overriden from base class, since tooltips have a completely transparent background
+ */
+ virtual void drawBackground() {}
+public:
+ WidgetInventoryTooltip(SherlockEngine *vm, WidgetInventory *owner);
+ virtual ~WidgetInventoryTooltip() {}
+
+ /**
+ * Set the text for the tooltip
+ */
+ void setText(const Common::String &str);
+
+ /**
+ * Handle updating the tooltip state
+ */
+ virtual void handleEvents();
+};
+
class WidgetInventory: public WidgetBase {
+ friend class WidgetInventoryTooltip;
private:
int _invVerbMode;
int _invSelect, _oldInvSelect;
@@ -44,7 +71,7 @@ private:
int _dialogTimer;
int _scrollHighlight;
Common::StringArray _inventCommands;
- WidgetTooltip _tooltipWidget;
+ WidgetInventoryTooltip _tooltipWidget;
Common::String _invVerb;
Common::String _invTarget;
Common::String _action;
@@ -60,11 +87,6 @@ private:
void drawScrollBar();
/**
- * Displays the description of any inventory item the moues cursor is over
- */
- void updateDescription();
-
- /**
* Check for keys to mouse the mouse within the inventory dialog
*/
void checkInvTabbingKeys();