diff options
author | Paul Gilbert | 2017-01-01 06:03:59 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-01-01 06:03:59 -0500 |
commit | 7ae58a1b2b9f6793c8d1f5ce3a424ea0dd379c4c (patch) | |
tree | 46dbee050548f2584c17b14dd4b52114e616dfcc /engines/titanic | |
parent | 32aea85344f9ed7f24ed99b7e71e00c81eae042e (diff) | |
download | scummvm-rg350-7ae58a1b2b9f6793c8d1f5ce3a424ea0dd379c4c.tar.gz scummvm-rg350-7ae58a1b2b9f6793c8d1f5ce3a424ea0dd379c4c.tar.bz2 scummvm-rg350-7ae58a1b2b9f6793c8d1f5ce3a424ea0dd379c4c.zip |
TITANIC: Support mouse wheel scrolling for MissiveOMat messages
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/gfx/edit_control.cpp | 12 | ||||
-rw-r--r-- | engines/titanic/gfx/edit_control.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/titanic/gfx/edit_control.cpp b/engines/titanic/gfx/edit_control.cpp index 9cf3a9fbd4..33707f93f6 100644 --- a/engines/titanic/gfx/edit_control.cpp +++ b/engines/titanic/gfx/edit_control.cpp @@ -26,6 +26,7 @@ namespace Titanic { BEGIN_MESSAGE_MAP(CEditControl, CGameObject) ON_MESSAGE(EditControlMsg) + ON_MESSAGE(MouseWheelMsg) END_MESSAGE_MAP() CEditControl::CEditControl() : CGameObject(), _showCursor(false), _fontNumber(0), _fieldD4(2), @@ -220,4 +221,15 @@ bool CEditControl::EditControlMsg(CEditControlMsg *msg) { return true; } +bool CEditControl::MouseWheelMsg(CMouseWheelMsg *msg) { + if (_name != "MissiveOMat Welcome") + return false; + + if (msg->_wheelUp) + scrollTextUp(); + else + scrollTextDown(); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/gfx/edit_control.h b/engines/titanic/gfx/edit_control.h index 141386009b..5ed91c9e84 100644 --- a/engines/titanic/gfx/edit_control.h +++ b/engines/titanic/gfx/edit_control.h @@ -30,6 +30,7 @@ namespace Titanic { class CEditControl : public CGameObject { DECLARE_MESSAGE_MAP; bool EditControlMsg(CEditControlMsg *msg); + bool MouseWheelMsg(CMouseWheelMsg *msg); protected: bool _showCursor; int _editLeft; |