diff options
Diffstat (limited to 'engines/titanic/pet_control/pet_remote_glyphs.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_remote_glyphs.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp index a41f6431a6..9ca69869fb 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.cpp +++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp @@ -97,17 +97,17 @@ void CToggleRemoteGlyph::draw2(CScreenManager *screenManager) { _gfxElement->draw(screenManager); } -bool CToggleRemoteGlyph::elementMouseButtonDownMsg(const Point &pt) { +bool CToggleRemoteGlyph::elementMouseButtonDownMsg(const Point &pt, int petNum) { return _gfxElement->MouseButtonDownMsg(pt); } -bool CToggleRemoteGlyph::elementMouseButtonUpMsg(const Point &pt) { +bool CToggleRemoteGlyph::elementMouseButtonUpMsg(const Point &pt, int petNum) { if (!_gfxElement->MouseButtonUpMsg(pt)) return false; CTreeItem *target = getPetControl()->_remoteTarget; if (target) { - CPETActivateMsg msg("SGTSelector", -1); + CPETActivateMsg msg("SGTSelector", petNum); msg.execute(target); _flag = !_flag; _gfxElement->setMode(_flag ? MODE_SELECTED : MODE_UNSELECTED); @@ -200,7 +200,7 @@ void CEntertainmentDeviceGlyph::draw2(CScreenManager *screenManager) { bool CEntertainmentDeviceGlyph::MouseButtonDownMsg(const Point &pt) { CString viewName = getPetControl()->getFullViewName(); if (viewName == "SGTState.Node 1.S") { - return elementMouseButtonDownMsg(pt); + return elementMouseButtonDownMsg(pt, 4); } else if (viewName == "SGTState.Node 4.E") { return _gfxElement->MouseButtonDownMsg(pt) || _gfxElement2->MouseButtonDownMsg(pt) @@ -213,7 +213,7 @@ bool CEntertainmentDeviceGlyph::MouseButtonDownMsg(const Point &pt) { bool CEntertainmentDeviceGlyph::MouseButtonUpMsg(const Point &pt) { CString viewName = getPetControl()->getFullViewName(); if (viewName == "SGTState.Node 1.S") { - return elementMouseButtonUpMsg(pt); + return elementMouseButtonUpMsg(pt, 4); } else if (viewName == "SGTState.Node 4.E") { if (_gfxElement->MouseButtonUpMsg(pt)) { _flag2 = !_flag2; @@ -315,4 +315,16 @@ void CDeployRelaxationGlyph::getTooltip(CPetText *text) { text->setText("Deploy fully recumbent relaxation device"); } +/*------------------------------------------------------------------------*/ + +bool CDeployComfortGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) { + CToggleRemoteGlyph::setup(petControl, owner); + setDefaults("3PetToilet", petControl); + return true; +} + +void CDeployComfortGlyph::getTooltip(CPetText *text) { + text->setText("Deploy comfort workstation"); +} + } // End of namespace Titanic |