[Scummvm-git-logs] scummvm master -> 7ae58a1b2b9f6793c8d1f5ce3a424ea0dd379c4c
dreammaster
dreammaster at scummvm.org
Sun Jan 1 12:04:08 CET 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7ae58a1b2b TITANIC: Support mouse wheel scrolling for MissiveOMat messages
Commit: 7ae58a1b2b9f6793c8d1f5ce3a424ea0dd379c4c
https://github.com/scummvm/scummvm/commit/7ae58a1b2b9f6793c8d1f5ce3a424ea0dd379c4c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-01-01T06:03:59-05:00
Commit Message:
TITANIC: Support mouse wheel scrolling for MissiveOMat messages
Changed paths:
engines/titanic/gfx/edit_control.cpp
engines/titanic/gfx/edit_control.h
diff --git a/engines/titanic/gfx/edit_control.cpp b/engines/titanic/gfx/edit_control.cpp
index 9cf3a9f..33707f9 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 1413860..5ed91c9 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;
More information about the Scummvm-git-logs
mailing list