aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-08-15 21:32:16 -0400
committerPaul Gilbert2014-08-15 21:32:16 -0400
commita347435f26b32464944c3e304369c4c7df663478 (patch)
tree1f188b81b96a88be77d61e1b670e6051d855e5e2
parent3475fda076779fa79f931b98d24e300fc02b479b (diff)
downloadscummvm-rg350-a347435f26b32464944c3e304369c4c7df663478.tar.gz
scummvm-rg350-a347435f26b32464944c3e304369c4c7df663478.tar.bz2
scummvm-rg350-a347435f26b32464944c3e304369c4c7df663478.zip
ACCESS: Added extra mouse handling to pollEvents
-rw-r--r--engines/access/events.cpp12
-rw-r--r--engines/access/events.h2
2 files changed, 12 insertions, 2 deletions
diff --git a/engines/access/events.cpp b/engines/access/events.cpp
index db69f7ba2d..f373c8b829 100644
--- a/engines/access/events.cpp
+++ b/engines/access/events.cpp
@@ -38,7 +38,7 @@ EventsManager::EventsManager(AccessEngine *vm): _vm(vm) {
_cursorId = CURSOR_NONE;
_frameCounter = 10;
_priorFrameTime = 0;
- _leftButton = false;
+ _leftButton = _rightButton = false;
_mouseMove = false;
}
@@ -126,10 +126,20 @@ void EventsManager::pollEvents() {
return;
case Common::EVENT_KEYUP:
return;
+ case Common::EVENT_MOUSEMOVE:
+ _mousePos = event.mouse;
+ break;
case Common::EVENT_LBUTTONDOWN:
_leftButton = true;
return;
case Common::EVENT_LBUTTONUP:
+ _leftButton = false;
+ return;
+ case Common::EVENT_RBUTTONDOWN:
+ _rightButton = true;
+ return;
+ case Common::EVENT_RBUTTONUP:
+ _rightButton = false;
return;
default:
break;
diff --git a/engines/access/events.h b/engines/access/events.h
index c3faf6333b..7ee03ac21e 100644
--- a/engines/access/events.h
+++ b/engines/access/events.h
@@ -51,7 +51,7 @@ private:
void nextFrame();
public:
CursorType _cursorId;
- bool _leftButton;
+ bool _leftButton, _rightButton;
Common::Point _mousePos;
bool _mouseMove;
public: