aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2016-12-30 19:21:44 -0500
committerPaul Gilbert2016-12-30 19:21:44 -0500
commita30442445eee5e1f5f93359f4555a0a2cd3bf0e9 (patch)
treea8ecc6fd6b99be40a972ca406aa477bfe8a2dad7 /engines
parent54004cf5065dae55097dbeea5066349cfe865167 (diff)
downloadscummvm-rg350-a30442445eee5e1f5f93359f4555a0a2cd3bf0e9.tar.gz
scummvm-rg350-a30442445eee5e1f5f93359f4555a0a2cd3bf0e9.tar.bz2
scummvm-rg350-a30442445eee5e1f5f93359f4555a0a2cd3bf0e9.zip
TITANIC: Add mouse wheel scrolling to inventory list
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/pet_control/pet_inventory.cpp9
-rw-r--r--engines/titanic/pet_control/pet_inventory.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/engines/titanic/pet_control/pet_inventory.cpp b/engines/titanic/pet_control/pet_inventory.cpp
index c1eb0754a2..aa1bb31809 100644
--- a/engines/titanic/pet_control/pet_inventory.cpp
+++ b/engines/titanic/pet_control/pet_inventory.cpp
@@ -94,6 +94,15 @@ bool CPetInventory::VirtualKeyCharMsg(CVirtualKeyCharMsg *msg) {
return _items.VirtualKeyCharMsg(msg);
}
+bool CPetInventory::MouseWheelMsg(CMouseWheelMsg *msg) {
+ if (msg->_wheelUp)
+ _items.scrollLeft();
+ else
+ _items.scrollRight();
+
+ return true;
+}
+
CGameObject *CPetInventory::dragEnd(const Point &pt) const {
return _items.getObjectAt(pt);
}
diff --git a/engines/titanic/pet_control/pet_inventory.h b/engines/titanic/pet_control/pet_inventory.h
index 5433feae95..7710ee0799 100644
--- a/engines/titanic/pet_control/pet_inventory.h
+++ b/engines/titanic/pet_control/pet_inventory.h
@@ -94,6 +94,7 @@ public:
virtual bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
virtual bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg);
virtual bool VirtualKeyCharMsg(CVirtualKeyCharMsg *msg);
+ virtual bool MouseWheelMsg(CMouseWheelMsg *msg);
/**
* Returns item a drag-drop operation has dropped on, if any