From 00cb975f158d82f80bcad3e025aeaedc8a5cd7d9 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 2 May 2016 20:30:28 -0400 Subject: TITANIC: Implement Deploy Floral Enhancement glyph --- engines/titanic/pet_control/pet_remote.cpp | 4 ++++ engines/titanic/pet_control/pet_remote_glyphs.cpp | 14 ++++++++++- engines/titanic/pet_control/pet_remote_glyphs.h | 29 ++++++++++++++++++++++- 3 files changed, 45 insertions(+), 2 deletions(-) (limited to 'engines') 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 */ -- cgit v1.2.3