diff options
author | Paul Gilbert | 2015-07-17 21:07:03 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-17 21:07:03 -0400 |
commit | d0a6af6cb92ec4d12ced8c1af90097ec06679a1d (patch) | |
tree | f5431f30fdcc202133adf5b3b9840483e6224094 /engines/sherlock/tattoo/widget_inventory.h | |
parent | 6cc72fc0c8ed4da4a99bf9db7f0798cf7a566df6 (diff) | |
download | scummvm-rg350-d0a6af6cb92ec4d12ced8c1af90097ec06679a1d.tar.gz scummvm-rg350-d0a6af6cb92ec4d12ced8c1af90097ec06679a1d.tar.bz2 scummvm-rg350-d0a6af6cb92ec4d12ced8c1af90097ec06679a1d.zip |
SHERLOCK: RT: Splitting inventory verb dialog code into it's own class
Diffstat (limited to 'engines/sherlock/tattoo/widget_inventory.h')
-rw-r--r-- | engines/sherlock/tattoo/widget_inventory.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/engines/sherlock/tattoo/widget_inventory.h b/engines/sherlock/tattoo/widget_inventory.h index 365dff6299..7b157cbd8c 100644 --- a/engines/sherlock/tattoo/widget_inventory.h +++ b/engines/sherlock/tattoo/widget_inventory.h @@ -61,24 +61,40 @@ public: virtual void handleEvents(); }; +class WidgetInventoryVerbs : public WidgetBase { +private: + WidgetInventory *_owner; + Common::StringArray _inventCommands; + Common::String _action; +public: + WidgetInventoryVerbs(SherlockEngine *vm, WidgetInventory *owner); + virtual ~WidgetInventoryVerbs() {} + + void load(); + + /** + * Handle updating the tooltip state + */ + virtual void handleEvents(); +}; + class WidgetInventory: public WidgetBase { friend class WidgetInventoryTooltip; + friend class WidgetInventoryVerbs; private: int _invVerbMode; - int _invSelect, _oldInvSelect; int _selector, _oldSelector; int _invVerbSelect, _oldInvVerbSelect; + int _invSelect, _oldInvSelect; int _dialogTimer; - Common::StringArray _inventCommands; WidgetInventoryTooltip _tooltipWidget; - Common::String _invVerb; - Common::String _invTarget; - Common::String _action; + WidgetInventoryVerbs _verbList; Common::Rect _invGraphicBounds; Surface _invGraphic; bool _swapItems; - Common::Rect _menuBounds, _oldMenuBounds; Surface _menuSurface; + Common::String _invTarget; + Common::String _invVerb; /** * Draw the bars within the dialog |