diff options
author | Paul Gilbert | 2016-04-23 10:26:15 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:11:46 -0400 |
commit | 990f7b87c1b328b0cb2b663d37f4a1de50edf56c (patch) | |
tree | fa62e3661a60e64671a9156fc531bf85cfdd8c76 /engines/titanic/pet_control/pet_real_life.cpp | |
parent | f79ebfa3e26cc748ef495a96da8acb9e005b3324 (diff) | |
download | scummvm-rg350-990f7b87c1b328b0cb2b663d37f4a1de50edf56c.tar.gz scummvm-rg350-990f7b87c1b328b0cb2b663d37f4a1de50edf56c.tar.bz2 scummvm-rg350-990f7b87c1b328b0cb2b663d37f4a1de50edf56c.zip |
TITANIC: Sort out PET enter and leave methods
Diffstat (limited to 'engines/titanic/pet_control/pet_real_life.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_real_life.cpp | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/engines/titanic/pet_control/pet_real_life.cpp b/engines/titanic/pet_control/pet_real_life.cpp index 38b7125ed3..ec1ea2c727 100644 --- a/engines/titanic/pet_control/pet_real_life.cpp +++ b/engines/titanic/pet_control/pet_real_life.cpp @@ -50,6 +50,52 @@ void CPetRealLife::draw(CScreenManager *screenManager) { _text.draw(screenManager); } +bool CPetRealLife::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { + return _glyphs.mouseButtonDown(msg->_mousePos); +} + +bool CPetRealLife::MouseDragStartMsg(CMouseDragStartMsg *msg) { + return _glyphs.mouseDragStart(msg); +} + +bool CPetRealLife::MouseDragMoveMsg(CMouseDragMoveMsg *msg) { + return _glyphs.mouseDragMove(msg); +} + +bool CPetRealLife::MouseDragEndMsg(CMouseDragEndMsg *msg) { + return _glyphs.mouseDragEnd(msg); +} + +bool CPetRealLife::MouseButtonUpMsg(CMouseButtonUpMsg *msg) { + return _glyphs.mouseButtonUp(msg->_mousePos); +} + +bool CPetRealLife::KeyCharMsg(CKeyCharMsg *msg) { + _glyphs.keyCharMsg(msg->_key); + return true; +} + +bool CPetRealLife::VirtualKeyCharMsg(CVirtualKeyCharMsg *msg) { + return _glyphs.virtualKeyCharMsg(msg->_keyState.keycode); +} + +void CPetRealLife::postLoad() { + reset(); +} + +bool CPetRealLife::isValid(CPetControl *petControl) { + setupControl(petControl); + return true; +} + +void CPetRealLife::enter(PetArea oldArea) { + _glyphs.enterHighlighted(); +} + +void CPetRealLife::leave() { + _glyphs.leaveHighlighted(); +} + bool CPetRealLife::setupControl(CPetControl *petControl) { if (petControl) { _petControl = petControl; @@ -78,11 +124,6 @@ void CPetRealLife::addButton(CPetGlyph *glyph) { } } -bool CPetRealLife::isValid(CPetControl *petControl) { - setupControl(petControl); - return true; -} - } // End of namespace Titanic |