aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2017-01-01 06:03:59 -0500
committerPaul Gilbert2017-01-01 06:03:59 -0500
commit7ae58a1b2b9f6793c8d1f5ce3a424ea0dd379c4c (patch)
tree46dbee050548f2584c17b14dd4b52114e616dfcc /engines
parent32aea85344f9ed7f24ed99b7e71e00c81eae042e (diff)
downloadscummvm-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')
-rw-r--r--engines/titanic/gfx/edit_control.cpp12
-rw-r--r--engines/titanic/gfx/edit_control.h1
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;