diff options
author | Paul Gilbert | 2016-05-01 23:48:22 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:38:06 -0400 |
commit | efaa86bee4f0183365309056d43b3aa3801f3ddf (patch) | |
tree | ff1b1c4330ac996c487637e4c193495db9ae5e6c /engines/titanic/pet_control/pet_remote_glyphs.h | |
parent | c3dadcfe3b9d62eb19970b200e941f138f8abf1b (diff) | |
download | scummvm-rg350-efaa86bee4f0183365309056d43b3aa3801f3ddf.tar.gz scummvm-rg350-efaa86bee4f0183365309056d43b3aa3801f3ddf.tar.bz2 scummvm-rg350-efaa86bee4f0183365309056d43b3aa3801f3ddf.zip |
TITANIC: Implement Television Control glyph
Diffstat (limited to 'engines/titanic/pet_control/pet_remote_glyphs.h')
-rw-r--r-- | engines/titanic/pet_control/pet_remote_glyphs.h | 58 |
1 files changed, 55 insertions, 3 deletions
diff --git a/engines/titanic/pet_control/pet_remote_glyphs.h b/engines/titanic/pet_control/pet_remote_glyphs.h index 56a2e2cf51..1a4ee28f12 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.h +++ b/engines/titanic/pet_control/pet_remote_glyphs.h @@ -29,7 +29,8 @@ namespace Titanic { enum RemoteGlyph { - GLYPH_SUMMON_ELEVATOR = 0 + GLYPH_SUMMON_ELEVATOR = 0, GLYPH_SUMMON_PELLERATOR = 1, + GLYPH_TELEVISION_CONTROL = 2 }; enum RemoteMessage { @@ -73,9 +74,13 @@ protected: CPetGfxElement *getElement(uint id) const; }; -class CSummonElevatorGlyph : public CPetRemoteGlyph { +class CBasicRemoteGlyph : public CPetRemoteGlyph { +private: + CString _gfxName, _tooltip, _msgString; public: - CSummonElevatorGlyph() : CPetRemoteGlyph() {} + CBasicRemoteGlyph(const CString &gfxName, const CString &tooltip, + const CString &msgString) : CPetRemoteGlyph(), + _gfxName(gfxName), _tooltip(tooltip), _msgString(msgString) {} /** * Setup the glyph @@ -103,6 +108,53 @@ public: virtual void getTooltip(CPetText *text); }; +class CSummonElevatorGlyph : public CBasicRemoteGlyph { +public: + CSummonElevatorGlyph() : CBasicRemoteGlyph( + "3PetLift", "Summon Elevator", "Lift") {} +}; + +class CSummonPelleratorGlyph : public CBasicRemoteGlyph { +public: + CSummonPelleratorGlyph() : CBasicRemoteGlyph( + "3PetPellerator", "Summon Pellerator", "Pellerator") {} +}; + +class CTelevisionControlGlyph : public CPetRemoteGlyph { +private: + bool _flag; + CPetGfxElement *_up, *_down, *_onOff; +public: + CTelevisionControlGlyph() : CPetRemoteGlyph(), _flag(false), + _up(nullptr), _down(nullptr), _onOff(nullptr) {} + + /** + * Setup the glyph + */ + virtual bool setup(CPetControl *petControl, CPetGlyphs *owner); + + /** + * Handles any secondary drawing of the glyph + */ + virtual void draw2(CScreenManager *screenManager); + + /** + * Called for mouse button down messages + */ + virtual bool MouseButtonDownMsg(const Point &pt); + + /** + * Handles mouse button up messages + */ + virtual bool MouseButtonUpMsg(const Point &pt); + + /** + * Returns the tooltip text for when the glyph is selected + */ + virtual void getTooltip(CPetText *text); +}; + + } // End of namespace Titanic #endif /* TITANIC_PET_REMOTE_GLYPHS_H */ |