diff options
author | Paul Gilbert | 2007-12-29 09:50:20 +0000 |
---|---|---|
committer | Paul Gilbert | 2007-12-29 09:50:20 +0000 |
commit | 59b56552665fe23b3c3daf236e94e391c20f757d (patch) | |
tree | 687193b02b168d9fc2580cada06d878988f2bcfe /engines | |
parent | 806ac51e45acd1997ef87f7e7824ecf6b4f8ec64 (diff) | |
download | scummvm-rg350-59b56552665fe23b3c3daf236e94e391c20f757d.tar.gz scummvm-rg350-59b56552665fe23b3c3daf236e94e391c20f757d.tar.bz2 scummvm-rg350-59b56552665fe23b3c3daf236e94e391c20f757d.zip |
Added access property for middle mouse button
svn-id: r30069
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lure/events.cpp | 12 | ||||
-rw-r--r-- | engines/lure/events.h | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/engines/lure/events.cpp b/engines/lure/events.cpp index 52916df0cc..d3b1235ec9 100644 --- a/engines/lure/events.cpp +++ b/engines/lure/events.cpp @@ -44,6 +44,7 @@ Mouse::Mouse() { _lButton = false; _rButton = false; + _mButton = false; _cursorNum = CURSOR_ARROW; _x = 0; _y = 0; @@ -70,6 +71,12 @@ void Mouse::handleEvent(Common::Event event) { case Common::EVENT_RBUTTONUP: _rButton = false; break; + case Common::EVENT_MBUTTONDOWN: + _mButton = true; + break; + case Common::EVENT_MBUTTONUP: + _mButton = false; + break; default: break; } @@ -134,7 +141,7 @@ void Mouse::waitForRelease() { do { while (e.pollEvent() && !e.quitFlag) ; g_system->delayMillis(20); - } while (!e.quitFlag && (lButton() || rButton())); + } while (!e.quitFlag && (lButton() || rButton() || mButton())); } /*--------------------------------------------------------------------------*/ @@ -164,6 +171,8 @@ bool Events::pollEvent() { case Common::EVENT_LBUTTONUP: case Common::EVENT_RBUTTONDOWN: case Common::EVENT_RBUTTONUP: + case Common::EVENT_MBUTTONDOWN: + case Common::EVENT_MBUTTONUP: case Common::EVENT_MOUSEMOVE: case Common::EVENT_WHEELUP: case Common::EVENT_WHEELDOWN: @@ -184,6 +193,7 @@ void Events::waitForPress() { if (_event.type == Common::EVENT_QUIT) return; else if (_event.type == Common::EVENT_KEYDOWN) keyButton = true; else if ((_event.type == Common::EVENT_LBUTTONDOWN) || + (_event.type == Common::EVENT_MBUTTONDOWN) || (_event.type == Common::EVENT_RBUTTONDOWN)) { keyButton = true; Mouse::getReference().waitForRelease(); diff --git a/engines/lure/events.h b/engines/lure/events.h index fa054da949..cd0e5f21d9 100644 --- a/engines/lure/events.h +++ b/engines/lure/events.h @@ -38,7 +38,7 @@ class Mouse { private: CursorType _cursorNum; int16 _x, _y; - bool _lButton, _rButton; + bool _lButton, _rButton, _mButton; public: Mouse(); ~Mouse(); @@ -55,6 +55,7 @@ public: int16 y() { return _y; } bool lButton() { return _lButton; } bool rButton() { return _rButton; } + bool mButton() { return _mButton; } void waitForRelease(); void pushCursorNum(CursorType cursorNum); void pushCursorNum(CursorType cursorNum, int hotspotX, int hotspotY); |