[Scummvm-cvs-logs] CVS: scummvm/gui newgui.cpp,1.98,1.99
Max Horn
fingolfin at users.sourceforge.net
Thu Jan 6 14:52:28 CET 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui about.cpp,1.23,1.24 newgui.cpp,1.97,1.98 newgui.h,1.52,1.53 widget.cpp,1.40,1.41
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.78,1.79 actor.h,1.41,1.42
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6950/gui
Modified Files:
newgui.cpp
Log Message:
Distinguish left and right mouse button
Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- newgui.cpp 6 Jan 2005 22:48:42 -0000 1.98
+++ newgui.cpp 6 Jan 2005 22:51:25 -0000 1.99
@@ -96,6 +96,7 @@
void NewGui::runLoop() {
Dialog *activeDialog = _dialogStack.top();
bool didSaveState = false;
+ int button;
if (activeDialog == 0)
return;
@@ -155,6 +156,7 @@
// We don't distinguish between mousebuttons (for now at least)
case OSystem::EVENT_LBUTTONDOWN:
case OSystem::EVENT_RBUTTONDOWN:
+ button = (event.type == OSystem::EVENT_LBUTTONDOWN ? 1 : 2);
if (_lastClick.count && (time < _lastClick.time + kDoubleClickDelay)
&& ABS(_lastClick.x - event.mouse.x) < 3
&& ABS(_lastClick.y - event.mouse.y) < 3) {
@@ -165,11 +167,12 @@
_lastClick.count = 1;
}
_lastClick.time = time;
- activeDialog->handleMouseDown(event.mouse.x - (activeDialog->_x * _scaleFactor), event.mouse.y - (activeDialog->_y * _scaleFactor), 1, _lastClick.count);
+ activeDialog->handleMouseDown(event.mouse.x - (activeDialog->_x * _scaleFactor), event.mouse.y - (activeDialog->_y * _scaleFactor), button, _lastClick.count);
break;
case OSystem::EVENT_LBUTTONUP:
case OSystem::EVENT_RBUTTONUP:
- activeDialog->handleMouseUp(event.mouse.x - (activeDialog->_x * _scaleFactor), event.mouse.y - (activeDialog->_y * _scaleFactor), 1, _lastClick.count);
+ button = (event.type == OSystem::EVENT_LBUTTONUP ? 1 : 2);
+ activeDialog->handleMouseUp(event.mouse.x - (activeDialog->_x * _scaleFactor), event.mouse.y - (activeDialog->_y * _scaleFactor), button, _lastClick.count);
break;
case OSystem::EVENT_WHEELUP:
activeDialog->handleMouseWheel(event.mouse.x - (activeDialog->_x * _scaleFactor), event.mouse.y - (activeDialog->_y * _scaleFactor), -1);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui about.cpp,1.23,1.24 newgui.cpp,1.97,1.98 newgui.h,1.52,1.53 widget.cpp,1.40,1.41
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.78,1.79 actor.h,1.41,1.42
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list