diff options
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/pet_control/pet_glyphs.h | 20 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_remote.cpp | 9 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_remote.h | 1 |
3 files changed, 20 insertions, 10 deletions
diff --git a/engines/titanic/pet_control/pet_glyphs.h b/engines/titanic/pet_control/pet_glyphs.h index 79e032162c..ac008c5ab0 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 46af55c4d3..f80403c573 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 22ea1e05ad..9cd9c1e9d7 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 |