aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_inventory_glyphs.h
diff options
context:
space:
mode:
authorPaul Gilbert2016-06-25 08:30:50 -0400
committerPaul Gilbert2016-07-15 19:24:49 -0400
commitbb567c6e1160615b647c27040743353df9311699 (patch)
treed6f75c5168572b566573e9aa5651e51cc84e497e /engines/titanic/pet_control/pet_inventory_glyphs.h
parent6f5f59af17290930ea75261c604471057e3b45e3 (diff)
downloadscummvm-rg350-bb567c6e1160615b647c27040743353df9311699.tar.gz
scummvm-rg350-bb567c6e1160615b647c27040743353df9311699.tar.bz2
scummvm-rg350-bb567c6e1160615b647c27040743353df9311699.zip
TITANIC: Adding PET Inventory Glyph methods
Diffstat (limited to 'engines/titanic/pet_control/pet_inventory_glyphs.h')
-rw-r--r--engines/titanic/pet_control/pet_inventory_glyphs.h71
1 files changed, 68 insertions, 3 deletions
diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.h b/engines/titanic/pet_control/pet_inventory_glyphs.h
index 17222a9076..06e1d06d30 100644
--- a/engines/titanic/pet_control/pet_inventory_glyphs.h
+++ b/engines/titanic/pet_control/pet_inventory_glyphs.h
@@ -37,21 +37,81 @@ private:
int populateItem(CGameObject *item, int val);
int subMode(CGameObject *item, int val);
+
+ /**
+ * Start any movie for the background
+ */
+ void startBackgroundMovie();
+
+ /**
+ * Start any movie for the foreground item
+ */
+ void startForegroundMovie();
+
+ /**
+ * Stop any previously started foreground or background movie
+ */
+ void stopMovie();
+
+ /**
+ * Reposition the inventory item
+ */
+ void reposition(const Point &pt);
public:
CGameObject *_item;
int _field34;
CGameObject *_background;
CGameObject *_image;
public:
- CPetInventoryGlyph() : _item(nullptr), _field34(0),
+ CPetInventoryGlyph() : _item(nullptr), _field34(1),
_background(nullptr), _image(nullptr) {}
CPetInventoryGlyph(CCarry *item, int val) : _item(item),
_field34(val), _background(nullptr), _image(nullptr) {}
/**
- * Set the inventory item
+ * Called when the PET area is entered
*/
- void setItem(CGameObject *item, int val);
+ virtual void enter();
+
+ /**
+ * Called when the PET area is left
+ */
+ virtual void leave();
+
+ /**
+ * Draw the glyph at a specified position
+ */
+ virtual void drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted);
+
+ /**
+ * Unhighlight any currently highlighted element
+ */
+ virtual void unhighlightCurrent();
+
+ /**
+ * Highlight any currently highlighted element
+ */
+ virtual void highlightCurrent(const Point &pt);
+
+ /**
+ * Glyph has been shifted to be first visible one
+ */
+ virtual void glyphFocused(const Point &topLeft, bool flag);
+
+ /**
+ * Called when a glyph drag starts
+ */
+ virtual bool dragGlyph(const Point &topLeft, CMouseDragStartMsg *msg);
+
+ /**
+ * Returns the tooltip text for when the glyph is selected
+ */
+ virtual void getTooltip(CPetText *text);
+
+ /**
+ * Return whether the glyph has an associated image
+ */
+ virtual bool hasImage() const { return _item && _background; }
/**
* Returns the object associated with the glyph
@@ -62,6 +122,11 @@ public:
* Does a processing action on the glyph
*/
virtual bool doAction(CGlyphAction *action);
+
+ /**
+ * Set the inventory item
+ */
+ void setItem(CGameObject *item, int val);
};
class CInventoryGlyphAction : public CGlyphAction {