aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-06-19 23:41:40 +0000
committerEugene Sandulenko2005-06-19 23:41:40 +0000
commit2c9d2ffc9796c3f794e9dbf22749e91b90eea6b8 (patch)
tree55e5b42c76e320065b95a3ec4f212516006d8bbf
parentbf304539fee94ab2baa4e39024a3e9c96cec548f (diff)
downloadscummvm-rg350-2c9d2ffc9796c3f794e9dbf22749e91b90eea6b8.tar.gz
scummvm-rg350-2c9d2ffc9796c3f794e9dbf22749e91b90eea6b8.tar.bz2
scummvm-rg350-2c9d2ffc9796c3f794e9dbf22749e91b90eea6b8.zip
Support for mouse wheel in Options dialog and in Converse panel
svn-id: r18414
-rw-r--r--saga/input.cpp6
-rw-r--r--saga/interface.cpp16
-rw-r--r--saga/interface.h4
3 files changed, 25 insertions, 1 deletions
diff --git a/saga/input.cpp b/saga/input.cpp
index 9dd1a566a4..b4362c07b1 100644
--- a/saga/input.cpp
+++ b/saga/input.cpp
@@ -130,6 +130,12 @@ int SagaEngine::processInput() {
_mousePos = event.mouse;
_interface->update(_mousePos, UPDATE_RIGHTBUTTONCLICK);
break;
+ case OSystem::EVENT_WHEELUP:
+ _interface->update(_mousePos, UPDATE_WHEELUP);
+ break;
+ case OSystem::EVENT_WHEELDOWN:
+ _interface->update(_mousePos, UPDATE_WHEELDOWN);
+ break;
case OSystem::EVENT_MOUSEMOVE:
_mousePos = event.mouse;
break;
diff --git a/saga/interface.cpp b/saga/interface.cpp
index c00b5b2cd1..1d4f5a1181 100644
--- a/saga/interface.cpp
+++ b/saga/interface.cpp
@@ -1213,6 +1213,12 @@ void Interface::update(const Point& mousePoint, int updateFlag) {
if (updateFlag & UPDATE_MOUSECLICK) {
handleConverseClick(mousePoint);
}
+ if (updateFlag & UPDATE_WHEELUP) {
+ converseChangePos(-1);
+ }
+ if (updateFlag & UPDATE_WHEELDOWN) {
+ converseChangePos(1);
+ }
if (_vm->_puzzle->isActive()) {
_vm->_puzzle->handleClick(mousePoint);
@@ -1229,6 +1235,16 @@ void Interface::update(const Point& mousePoint, int updateFlag) {
if (updateFlag & UPDATE_MOUSECLICK) {
handleOptionClick(mousePoint);
}
+ if (updateFlag & UPDATE_WHEELUP) {
+ if (_optionSaveFileTop)
+ _optionSaveFileTop--;
+ calcOptionSaveSlider();
+ }
+ if (updateFlag & UPDATE_WHEELDOWN) {
+ if (_optionSaveFileTop < _vm->getSaveFilesCount() - _vm->getDisplayInfo().optionSaveFileVisible)
+ _optionSaveFileTop++;
+ calcOptionSaveSlider();
+ }
}
}
diff --git a/saga/interface.h b/saga/interface.h
index c8b990b147..02ad3d9017 100644
--- a/saga/interface.h
+++ b/saga/interface.h
@@ -38,7 +38,9 @@ enum InterfaceUpdateFlags {
UPDATE_MOUSEMOVE = 1,
UPDATE_LEFTBUTTONCLICK = 2,
UPDATE_RIGHTBUTTONCLICK = 4,
- UPDATE_MOUSECLICK = UPDATE_LEFTBUTTONCLICK | UPDATE_RIGHTBUTTONCLICK
+ UPDATE_MOUSECLICK = UPDATE_LEFTBUTTONCLICK | UPDATE_RIGHTBUTTONCLICK,
+ UPDATE_WHEELUP = 8,
+ UPDATE_WHEELDOWN = 16
};
#define ITE_INVENTORY_SIZE 24