From 3adaf2f999c4af74534beb7d02638aba8cc81a1e Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 21 Jun 2015 08:46:38 -0400 Subject: SHERLOCK: RT: Implement inventory handleEvents --- engines/sherlock/tattoo/widget_inventory.h | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'engines/sherlock/tattoo/widget_inventory.h') diff --git a/engines/sherlock/tattoo/widget_inventory.h b/engines/sherlock/tattoo/widget_inventory.h index 34e25eeaa0..29bcdaa0ea 100644 --- a/engines/sherlock/tattoo/widget_inventory.h +++ b/engines/sherlock/tattoo/widget_inventory.h @@ -25,6 +25,7 @@ #include "common/scummsys.h" #include "sherlock/tattoo/widget_base.h" +#include "sherlock/tattoo/widget_tooltip.h" namespace Sherlock { @@ -37,7 +38,19 @@ private: int _invVerbMode; int _invSelect, _oldInvSelect; int _selector, _oldSelector; + int _invVerbSelect, _oldInvVerbSelect; int _dialogTimer; + int _scrollHighlight; + Common::StringArray _inventCommands; + WidgetTooltip _tooltipWidget; + Common::String _invVerb; + Common::String _invTarget; + Common::String _action; + Common::Rect _invGraphicBounds; + Surface _invGraphic; + bool _swapItems; + Common::Rect _menuBounds, _oldMenuBounds; + Surface _menuSurface; /** * Draw the scrollbar for the dialog @@ -48,6 +61,21 @@ private: * Draws all the dialog rectangles for any items that need them */ void drawDialogRect(const Common::Rect &r, bool raised); + + /** + * 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(); + + /** + * Highlights the controls + */ + void highlightControls(); public: int _invMode; public: @@ -60,6 +88,16 @@ public: * Draw the inventory on the surface */ void drawInventory(); + + /** + * Handle events whilst the widget is on-screen + */ + virtual void handleEvents(); + + /** + * Close a currently active menu + */ + virtual void banishWindow(); }; } // End of namespace Tattoo -- cgit v1.2.3