aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_remote_glyphs.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-05-02 08:32:25 -0400
committerPaul Gilbert2016-07-10 16:38:07 -0400
commit947d9e344c2e51c7ad8e4fe1f78fb131cafc921a (patch)
tree076894b5e5091b9557fddad3dcbffbe81118657e /engines/titanic/pet_control/pet_remote_glyphs.cpp
parentefaa86bee4f0183365309056d43b3aa3801f3ddf (diff)
downloadscummvm-rg350-947d9e344c2e51c7ad8e4fe1f78fb131cafc921a.tar.gz
scummvm-rg350-947d9e344c2e51c7ad8e4fe1f78fb131cafc921a.tar.bz2
scummvm-rg350-947d9e344c2e51c7ad8e4fe1f78fb131cafc921a.zip
TITANIC: Implement toggle remote glyph base class
Diffstat (limited to 'engines/titanic/pet_control/pet_remote_glyphs.cpp')
-rw-r--r--engines/titanic/pet_control/pet_remote_glyphs.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp
index 9db3b66c3d..85c4fb8889 100644
--- a/engines/titanic/pet_control/pet_remote_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp
@@ -83,6 +83,20 @@ void CBasicRemoteGlyph::getTooltip(CPetText *text) {
/*------------------------------------------------------------------------*/
+bool CToggleRemoteGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
+ CPetGlyph::setup(petControl, owner);
+ if (owner)
+ _gfxElement = getElement(0);
+ return true;
+}
+
+void CToggleRemoteGlyph::draw2(CScreenManager *screenManager) {
+ _gfxElement->setMode(_flag ? MODE_SELECTED : MODE_UNSELECTED);
+ _gfxElement->draw(screenManager);
+}
+
+/*------------------------------------------------------------------------*/
+
bool CTelevisionControlGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
CPetRemoteGlyph::setup(petControl, owner);
setDefaults("3PetTV", petControl);
@@ -137,4 +151,16 @@ void CTelevisionControlGlyph::getTooltip(CPetText *text) {
text->setText("Television control");
}
+/*------------------------------------------------------------------------*/
+
+bool CEntertainmentDeviceGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
+ CPetRemoteGlyph::setup(petControl, owner);
+ if (owner) {
+ _gfxElement2 = getElement(1);
+ _gfxElement3 = getElement(2);
+ }
+
+ return true;
+}
+
} // End of namespace Titanic