aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_inventory.h
diff options
context:
space:
mode:
authorPaul Gilbert2016-06-25 16:09:15 -0400
committerPaul Gilbert2016-07-15 19:24:53 -0400
commit42c8ac1c880076c181071922aff3b923a185af98 (patch)
tree84108ee7a37cca0917e93121ee51264c47b3587d /engines/titanic/pet_control/pet_inventory.h
parent5fe1f73159d43cd165d20bdc8297eb5eb6d42492 (diff)
downloadscummvm-rg350-42c8ac1c880076c181071922aff3b923a185af98.tar.gz
scummvm-rg350-42c8ac1c880076c181071922aff3b923a185af98.tar.bz2
scummvm-rg350-42c8ac1c880076c181071922aff3b923a185af98.zip
TITANIC: Added Pet Inventorty virtual methods
Diffstat (limited to 'engines/titanic/pet_control/pet_inventory.h')
-rw-r--r--engines/titanic/pet_control/pet_inventory.h47
1 files changed, 37 insertions, 10 deletions
diff --git a/engines/titanic/pet_control/pet_inventory.h b/engines/titanic/pet_control/pet_inventory.h
index 3437d098ef..e931abf5c6 100644
--- a/engines/titanic/pet_control/pet_inventory.h
+++ b/engines/titanic/pet_control/pet_inventory.h
@@ -53,6 +53,11 @@ private:
* Get the index of an item added to the PET
*/
int getItemIndex(CGameObject *item) const;
+
+ /**
+ * Remove any invalid inventory glyphs
+ */
+ void removeInvalid();
public:
CPetInventory();
@@ -77,41 +82,63 @@ public:
virtual Rect getBounds();
/**
- * Save the data for the class to file
+ * Called when a general change occurs
*/
- virtual void save(SimpleFile *file, int indent) const;
+ virtual void changed(int changeType);
/**
- * Load the data for the class from file
+ * Following are handlers for the various messages that the PET can
+ * pass onto the currently active section/area
*/
- virtual void load(SimpleFile *file, int param);
+ virtual bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
+ virtual bool MouseDragStartMsg(CMouseDragStartMsg *msg);
+ virtual bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
+ virtual bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg);
+ virtual bool VirtualKeyCharMsg(CVirtualKeyCharMsg *msg);
/**
* Returns item a drag-drop operation has dropped on, if any
*/
virtual CGameObject *dragEnd(const Point &pt) const;
-
/**
* Returns true if the object is in a valid state
*/
virtual bool isValid(CPetControl *petControl);
/**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file, int param);
+
+ /**
* Called after a game has been loaded
*/
virtual void postLoad();
/**
- * Called when a section is switched to
+ * Save the data for the class to file
*/
+ virtual void save(SimpleFile *file, int indent) const;
+
+ /**
+ * Called when a section is switched to
+ */
virtual void enter(PetArea oldArea);
-
+
/**
- * Called when a section is being left, to switch to another area
- */
+ * Called when a section is being left, to switch to another area
+ */
virtual void leave();
-
+
+ /**
+ * Get a reference to the tooltip text associated with the section
+ */
+ virtual CPetText *getText() { return &_text; }
+
+ /**
+ * Special retrieval of glyph background image
+ */
virtual CGameObject *getBackground(int index) const;
/**