[Scummvm-cvs-logs] SF.net SVN: scummvm: [30069] scummvm/trunk/engines/lure

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Sat Dec 29 10:50:20 CET 2007


Revision: 30069
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30069&view=rev
Author:   dreammaster
Date:     2007-12-29 01:50:20 -0800 (Sat, 29 Dec 2007)

Log Message:
-----------
Added access property for middle mouse button

Modified Paths:
--------------
    scummvm/trunk/engines/lure/events.cpp
    scummvm/trunk/engines/lure/events.h

Modified: scummvm/trunk/engines/lure/events.cpp
===================================================================
--- scummvm/trunk/engines/lure/events.cpp	2007-12-29 09:48:49 UTC (rev 30068)
+++ scummvm/trunk/engines/lure/events.cpp	2007-12-29 09:50:20 UTC (rev 30069)
@@ -44,6 +44,7 @@
 
 	_lButton = false;
 	_rButton = false;
+	_mButton = false;
 	_cursorNum = CURSOR_ARROW;
 	_x = 0;
 	_y = 0;
@@ -70,6 +71,12 @@
 	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 @@
 	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 @@
 	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 @@
 			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();

Modified: scummvm/trunk/engines/lure/events.h
===================================================================
--- scummvm/trunk/engines/lure/events.h	2007-12-29 09:48:49 UTC (rev 30068)
+++ scummvm/trunk/engines/lure/events.h	2007-12-29 09:50:20 UTC (rev 30069)
@@ -38,7 +38,7 @@
 private:
 	CursorType _cursorNum;
 	int16 _x, _y;
-	bool _lButton, _rButton;
+	bool _lButton, _rButton, _mButton;
 public:
 	Mouse();
 	~Mouse();
@@ -55,6 +55,7 @@
 	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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list