[Scummvm-git-logs] scummvm master -> a30442445eee5e1f5f93359f4555a0a2cd3bf0e9
dreammaster
dreammaster at scummvm.org
Sat Dec 31 01:21:56 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:
a30442445e TITANIC: Add mouse wheel scrolling to inventory list
Commit: a30442445eee5e1f5f93359f4555a0a2cd3bf0e9
https://github.com/scummvm/scummvm/commit/a30442445eee5e1f5f93359f4555a0a2cd3bf0e9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-12-30T19:21:44-05:00
Commit Message:
TITANIC: Add mouse wheel scrolling to inventory list
Changed paths:
engines/titanic/pet_control/pet_inventory.cpp
engines/titanic/pet_control/pet_inventory.h
diff --git a/engines/titanic/pet_control/pet_inventory.cpp b/engines/titanic/pet_control/pet_inventory.cpp
index c1eb075..aa1bb31 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 5433fea..7710ee0 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
More information about the Scummvm-git-logs
mailing list