diff options
author | Paul Gilbert | 2016-04-28 19:10:18 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:22:33 -0400 |
commit | b7ad513b0f0c99bc670546dbb3483e93d59652ee (patch) | |
tree | 82b392afae383fba2fffe5b2016fcceb21240432 /engines/titanic/pet_control/pet_conversations.cpp | |
parent | b324d2ea6cd422bafd846642ed54620abe7e32ea (diff) | |
download | scummvm-rg350-b7ad513b0f0c99bc670546dbb3483e93d59652ee.tar.gz scummvm-rg350-b7ad513b0f0c99bc670546dbb3483e93d59652ee.tar.bz2 scummvm-rg350-b7ad513b0f0c99bc670546dbb3483e93d59652ee.zip |
TITANIC: Implement PET Text scrolling
Diffstat (limited to 'engines/titanic/pet_control/pet_conversations.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_conversations.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/engines/titanic/pet_control/pet_conversations.cpp b/engines/titanic/pet_control/pet_conversations.cpp index 3afd5ee380..d2c891efb8 100644 --- a/engines/titanic/pet_control/pet_conversations.cpp +++ b/engines/titanic/pet_control/pet_conversations.cpp @@ -21,6 +21,7 @@ */ #include "titanic/pet_control/pet_conversations.h" +#include "titanic/pet_control/pet_control.h" namespace Titanic { @@ -44,6 +45,14 @@ bool CPetConversations::isValid(CPetControl *petControl) { return setupControl(petControl); } +bool CPetConversations::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { + return + _scrollUp.MouseButtonDownMsg(msg->_mousePos) || + _scrollDown.MouseButtonDownMsg(msg->_mousePos) || + _val7.MouseButtonDownMsg(msg->_mousePos) || + _val8.MouseButtonDownMsg(msg->_mousePos); +} + bool CPetConversations::setupControl(CPetControl *petControl) { if (petControl) { _petControl = petControl; @@ -60,10 +69,10 @@ bool CPetConversations::setupControl(CPetControl *petControl) { _gfxList[2].translate(20, 434); const Rect rect2(0, 0, 11, 24); - _val1.setBounds(rect2); - _val1.translate(87, 374); - _val2.setBounds(rect2); - _val2.translate(87, 421); + _scrollUp.setBounds(rect2); + _scrollUp.translate(87, 374); + _scrollDown.setBounds(rect2); + _scrollDown.translate(87, 421); const Rect rect3(0, 0, 39, 39); _val7.setBounds(rect3); @@ -86,4 +95,16 @@ bool CPetConversations::setupControl(CPetControl *petControl) { return true; } +void CPetConversations::scrollDown() { + _log.scrollDown(CScreenManager::_screenManagerPtr); + if (_petControl) + _petControl->makeDirty(); +} + +void CPetConversations::scrollUp() { + _log.scrollUp(CScreenManager::_screenManagerPtr); + if (_petControl) + _petControl->makeDirty(); +} + } // End of namespace Titanic |