Skip to content

Commit

Permalink
ACCESS: Added extra mouse handling to pollEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Aug 16, 2014
1 parent 3475fda commit a347435
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion engines/access/events.cpp
Expand Up @@ -38,7 +38,7 @@ EventsManager::EventsManager(AccessEngine *vm): _vm(vm) {
_cursorId = CURSOR_NONE;
_frameCounter = 10;
_priorFrameTime = 0;
_leftButton = false;
_leftButton = _rightButton = false;
_mouseMove = false;
}

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion engines/access/events.h
Expand Up @@ -51,7 +51,7 @@ class EventsManager {
void nextFrame();
public:
CursorType _cursorId;
bool _leftButton;
bool _leftButton, _rightButton;
Common::Point _mousePos;
bool _mouseMove;
public:
Expand Down

0 comments on commit a347435

Please sign in to comment.