TITANIC: Implement Deploy Floral Enhancement glyph

This commit is contained in:
Paul Gilbert
2016-07-10 16:38:10 -04:00
parent ab769eee0c
commit 00cb975f15
3 changed files with 45 additions and 2 deletions
@@ -329,6 +329,10 @@ bool CPetRemote::loadGlyph(int glyphIndex) {
glyph = new COperateLightsGlyph();
break;
case GLYPH_DEPLOY_FLORAL:
glyph = new CDeployFloralGlyph();
break;
default:
break;
}
@@ -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
@@ -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 */