aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/util.cpp')
-rw-r--r--engines/gob/util.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp
index 0ccb31e1c9..550d5e9a21 100644
--- a/engines/gob/util.cpp
+++ b/engines/gob/util.cpp
@@ -77,12 +77,19 @@ void Util::initInput(void) {
_keyBufferHead = _keyBufferTail = 0;
}
-void Util::processInput() {
+void Util::processInput(bool scroll) {
Common::Event event;
Common::EventManager *eventMan = g_system->getEventManager();
+ int16 x, y;
+ bool hasMove = false;
while (eventMan->pollEvent(event)) {
switch (event.type) {
+ case Common::EVENT_MOUSEMOVE:
+ hasMove = true;
+ x = event.mouse.x;
+ y = event.mouse.y;
+ break;
case Common::EVENT_LBUTTONDOWN:
_mouseButtons |= 1;
break;
@@ -107,6 +114,9 @@ void Util::processInput() {
break;
}
}
+
+ if (scroll && hasMove)
+ _vm->_game->evaluateScroll(x, y);
}
void Util::clearKeyBuf(void) {