diff options
author | Paul Gilbert | 2016-05-02 20:30:28 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:38:10 -0400 |
commit | 00cb975f158d82f80bcad3e025aeaedc8a5cd7d9 (patch) | |
tree | 2ac99eb33f4a82ea72c64f5caca16351e78f42ce | |
parent | ab769eee0c99f262052b7a15295a74053943a372 (diff) | |
download | scummvm-rg350-00cb975f158d82f80bcad3e025aeaedc8a5cd7d9.tar.gz scummvm-rg350-00cb975f158d82f80bcad3e025aeaedc8a5cd7d9.tar.bz2 scummvm-rg350-00cb975f158d82f80bcad3e025aeaedc8a5cd7d9.zip |
TITANIC: Implement Deploy Floral Enhancement glyph
-rw-r--r-- | engines/titanic/pet_control/pet_remote.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_remote_glyphs.cpp | 14 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_remote_glyphs.h | 29 |
3 files changed, 45 insertions, 2 deletions
diff --git a/engines/titanic/pet_control/pet_remote.cpp b/engines/titanic/pet_control/pet_remote.cpp index 1ed0251f24..6ba6e558c3 100644 --- a/engines/titanic/pet_control/pet_remote.cpp +++ b/engines/titanic/pet_control/pet_remote.cpp @@ -329,6 +329,10 @@ bool CPetRemote::loadGlyph(int glyphIndex) { glyph = new COperateLightsGlyph(); break; + case GLYPH_DEPLOY_FLORAL: + glyph = new CDeployFloralGlyph(); + break; + default: break; } diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp index c1d86d6703..edf1dce80f 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.cpp +++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp @@ -238,7 +238,6 @@ void CEntertainmentDeviceGlyph::getTooltip(CPetText *text) { /*------------------------------------------------------------------------*/ - bool COperateLightsGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) { CPetRemoteGlyph::setup(petControl, owner); setDefaults("3PetLights", petControl); @@ -291,4 +290,17 @@ void COperateLightsGlyph::getTooltip(CPetText *text) { text->setText("Operate the lights"); } +/*------------------------------------------------------------------------*/ + +bool CDeployFloralGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) { + CToggleRemoteGlyph::setup(petControl, owner); + setDefaults("3PetVase", petControl); + return true; +} + +void CDeployFloralGlyph::getTooltip(CPetText *text) { + text->setText("Deploy floral enhancement"); +} + + } // End of namespace Titanic diff --git a/engines/titanic/pet_control/pet_remote_glyphs.h b/engines/titanic/pet_control/pet_remote_glyphs.h index 39f9164979..de56787bd0 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.h +++ b/engines/titanic/pet_control/pet_remote_glyphs.h @@ -31,7 +31,7 @@ namespace Titanic { enum RemoteGlyph { GLYPH_SUMMON_ELEVATOR = 0, GLYPH_SUMMON_PELLERATOR = 1, GLYPH_TELEVISION_CONTROL = 2, GLYPH_ENTERTAINMENT_DEVICE = 3, - GLYPH_OPERATE_LIGHTS = 4 + GLYPH_OPERATE_LIGHTS = 4, GLYPH_DEPLOY_FLORAL = 5 }; enum RemoteMessage { @@ -251,6 +251,33 @@ public: virtual void getTooltip(CPetText *text); }; +class CDeployFloralGlyph : public CToggleRemoteGlyph { +public: + /** + * Setup the glyph + */ + virtual bool setup(CPetControl *petControl, CPetGlyphs *owner); + + /** + * Called for mouse button down messages + */ + virtual bool MouseButtonDownMsg(const Point &pt) { + return elementMouseButtonDownMsg(pt); + } + + /** + * Handles mouse button up messages + */ + virtual bool MouseButtonUpMsg(const Point &pt) { + return elementMouseButtonUpMsg(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 */ |