From 3b08987ad298dd4258df44de98fddc620d8a045f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 29 Mar 2017 21:49:22 -0400 Subject: TITANIC: Add remote icon for skipping nav puzzle --- engines/titanic/pet_control/pet_remote_glyphs.cpp | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'engines/titanic/pet_control/pet_remote_glyphs.cpp') diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp index 7f52ca7ee9..e9b2094dc8 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.cpp +++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp @@ -618,4 +618,41 @@ CGotoRestaurantGlyph::CGotoRestaurantGlyph() : CRemoteGotoGlyph("3Pet1stClassRes g_vm->_strings[GO_TO_1ST_CLASS_RESTAURANT], 1) { } +/*------------------------------------------------------------------------*/ + +bool CSkipNavigationGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) { + CPetRemoteGlyph::setup(petControl, owner); + setDefaults("3PetTV", petControl); + if (owner) { + _button = getElement(7); + } + + return true; +} + +void CSkipNavigationGlyph::draw2(CScreenManager *screenManager) { + _button->draw(screenManager); +} + +bool CSkipNavigationGlyph::MouseButtonDownMsg(const Point &pt) { + if (_button && _button->MouseButtonDownMsg(pt)) + return true; + + return false; +} + +bool CSkipNavigationGlyph::MouseButtonUpMsg(const Point &pt) { + if (_button && _button->MouseButtonUpMsg(pt)) { + CActMsg actMsg("SetDestin"); + actMsg.execute("CaptainsWheel"); + return true; + } + + return false; +} + +void CSkipNavigationGlyph::getTooltip(CTextControl *text) { + text->setText(SKIP_NAVIGATION); +} + } // End of namespace Titanic -- cgit v1.2.3