[Scummvm-cvs-logs] SF.net SVN: scummvm: [21459] scummvm/trunk/engines/sky

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sat Mar 25 22:23:01 CET 2006


Revision: 21459
Author:   eriktorbjorn
Date:     2006-03-25 22:22:41 -0800 (Sat, 25 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21459&view=rev

Log Message:
-----------
Added support for mouse wheel scrolling in save/restore dialog.

Modified Paths:
--------------
    scummvm/trunk/engines/sky/control.cpp
    scummvm/trunk/engines/sky/control.h
Modified: scummvm/trunk/engines/sky/control.cpp
===================================================================
--- scummvm/trunk/engines/sky/control.cpp	2006-03-26 04:50:09 UTC (rev 21458)
+++ scummvm/trunk/engines/sky/control.cpp	2006-03-26 06:22:41 UTC (rev 21459)
@@ -820,6 +820,7 @@
 uint16 Control::saveRestorePanel(bool allowSave) {
 
 	_keyPressed = 0;
+	_mouseWheel = 0;
 	buttonControl(NULL);
 	_text->drawToScreen(WITH_MASK); // flush text restore buffer
 
@@ -892,6 +893,18 @@
 			_keyPressed = 0;
 		}
 
+		if (_mouseWheel) {
+			if (_mouseWheel < 0)
+				clickRes = shiftUp(SLOW);
+			else if (_mouseWheel > 0)
+				clickRes = shiftDown(SLOW);
+			_mouseWheel = 0;
+			if (clickRes == SHIFTED) {
+				_selectedGame = _firstText;
+				refreshNames = true;
+			}
+		}
+
 		bool haveButton = false;
 		for (cnt = 0; cnt < lookListLen; cnt++)
 			if (lookList[cnt]->isMouseOver(_mouseX, _mouseY)) {
@@ -1548,6 +1561,12 @@
 				break;
 			case OSystem::EVENT_RBUTTONDOWN:
 				break;
+			case OSystem::EVENT_WHEELUP:
+				_mouseWheel = -1;
+				break;
+			case OSystem::EVENT_WHEELDOWN:
+				_mouseWheel = 1;
+				break;
 			case OSystem::EVENT_QUIT:
 				SkyEngine::_systemVars.quitGame = true;
 				break;

Modified: scummvm/trunk/engines/sky/control.h
===================================================================
--- scummvm/trunk/engines/sky/control.h	2006-03-26 04:50:09 UTC (rev 21458)
+++ scummvm/trunk/engines/sky/control.h	2006-03-26 06:22:41 UTC (rev 21459)
@@ -242,6 +242,7 @@
 	int _mouseX, _mouseY;
 	bool _mouseClicked;
 	byte _keyPressed;
+	int _mouseWheel;
 
 	struct {
 		uint8 *controlPanel;


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