[Scummvm-git-logs] scummvm master -> 4e3a9b25ea249e6cd2efc9717dcfaaa5e58df4f7
dreammaster
dreammaster at scummvm.org
Thu Nov 17 01:21:31 CET 2016
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:
4e3a9b25ea TITANIC: Implement mouse scrolling for PET Remote
Commit: 4e3a9b25ea249e6cd2efc9717dcfaaa5e58df4f7
https://github.com/scummvm/scummvm/commit/4e3a9b25ea249e6cd2efc9717dcfaaa5e58df4f7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-11-16T19:21:25-05:00
Commit Message:
TITANIC: Implement mouse scrolling for PET Remote
Changed paths:
engines/titanic/pet_control/pet_glyphs.h
engines/titanic/pet_control/pet_remote.cpp
engines/titanic/pet_control/pet_remote.h
diff --git a/engines/titanic/pet_control/pet_glyphs.h b/engines/titanic/pet_control/pet_glyphs.h
index 79e0321..ac008c5 100644
--- a/engines/titanic/pet_control/pet_glyphs.h
+++ b/engines/titanic/pet_control/pet_glyphs.h
@@ -275,16 +275,6 @@ private:
CPetGlyph *getGlyph(int index) const;
/**
- * Scrolls the glyphs to the left
- */
- void scrollLeft();
-
- /**
- * Scrolls the glyphs to the right
- */
- void scrollRight();
-
- /**
* Set the first visible glyph index
*/
void setFirstVisible(int index);
@@ -456,6 +446,16 @@ public:
void scrollToStart() { _firstVisibleIndex = 0; }
/**
+ * Scrolls the glyphs to the left
+ */
+ void scrollLeft();
+
+ /**
+ * Scrolls the glyphs to the right
+ */
+ void scrollRight();
+
+ /**
* Increment the currently selected index
*/
void incSelection();
diff --git a/engines/titanic/pet_control/pet_remote.cpp b/engines/titanic/pet_control/pet_remote.cpp
index 46af55c..f80403c 100644
--- a/engines/titanic/pet_control/pet_remote.cpp
+++ b/engines/titanic/pet_control/pet_remote.cpp
@@ -161,6 +161,15 @@ bool CPetRemote::VirtualKeyCharMsg(CVirtualKeyCharMsg *msg) {
return _items.VirtualKeyCharMsg(msg);
}
+bool CPetRemote::MouseWheelMsg(CMouseWheelMsg *msg) {
+ if (msg->_wheelUp)
+ _items.scrollLeft();
+ else
+ _items.scrollRight();
+
+ return true;
+}
+
bool CPetRemote::isValid(CPetControl *petControl) {
return setupControl(petControl);
}
diff --git a/engines/titanic/pet_control/pet_remote.h b/engines/titanic/pet_control/pet_remote.h
index 22ea1e0..9cd9c1e 100644
--- a/engines/titanic/pet_control/pet_remote.h
+++ b/engines/titanic/pet_control/pet_remote.h
@@ -112,6 +112,7 @@ public:
virtual bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
virtual bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg);
virtual bool VirtualKeyCharMsg(CVirtualKeyCharMsg *msg);
+ virtual bool MouseWheelMsg(CMouseWheelMsg *msg);
/**
* Returns true if the object is in a valid state
More information about the Scummvm-git-logs
mailing list