[Scummvm-cvs-logs] CVS: scummvm newgui.cpp,1.17,1.18 newgui.h,1.12,1.13 scummvm.cpp,1.173,1.174

Max Horn fingolfin at users.sourceforge.net
Sat Jul 13 15:42:01 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv4338

Modified Files:
	newgui.cpp newgui.h scummvm.cpp 
Log Message:
added latest of painelf's patches which makes NewGui handle system events directly (code becomes much cleaner and more powerful this way); he also implemented a 'focus' item in NewGui; atop of this several changes of my own that further improve the GUI behaviour

Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/newgui.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- newgui.cpp	13 Jul 2002 18:32:09 -0000	1.17
+++ newgui.cpp	13 Jul 2002 22:41:28 -0000	1.18
@@ -80,7 +80,7 @@
 		saveState();
 		if (_use_alpha_blending)
 			activeDialog->setupScreenBuf();
-#if 1
+#if 0
 		// FIXME - hack to encode our own custom GUI colors. Since we have to live
 		// with a given 8 bit palette, the result is not always as nice as one
 		// would wish, but this is just an experiment after all.
@@ -94,7 +94,9 @@
 #endif
 		_prepare_for_gui = false;
 	}
-	
+
+	activeDialog->handleTickle();
+
 	if (_need_redraw) {
 		activeDialog->draw();
 		_need_redraw = false;
@@ -118,16 +120,16 @@
 //					activeDialog->handleKeyUp(t.kbd.ascii, t.kbd.flags);
 					break;
 				case OSystem::EVENT_MOUSEMOVE:
-					activeDialog->handleMouseMoved(t.mouse.x, t.mouse.y, 0);
+					activeDialog->handleMouseMoved(t.mouse.x - activeDialog->_x, t.mouse.y - activeDialog->_y, 0);
 					break;
 				// We don't distinguish between mousebuttons (for now at least)
 				case OSystem::EVENT_LBUTTONDOWN:
 				case OSystem::EVENT_RBUTTONDOWN:
-					activeDialog->handleMouseDown(t.mouse.x, t.mouse.y, 1);
+					activeDialog->handleMouseDown(t.mouse.x - activeDialog->_x, t.mouse.y - activeDialog->_y, 1);
 					break;
 				case OSystem::EVENT_LBUTTONUP:
 				case OSystem::EVENT_RBUTTONUP:
-					activeDialog->handleMouseUp(t.mouse.x, t.mouse.y, 1);
+					activeDialog->handleMouseUp(t.mouse.x - activeDialog->_x, t.mouse.y - activeDialog->_y, 1);
 					break;
 			}
 		}

Index: newgui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/newgui.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- newgui.h	13 Jul 2002 18:32:09 -0000	1.12
+++ newgui.h	13 Jul 2002 22:41:28 -0000	1.13
@@ -45,7 +45,6 @@
 	void	pop()				{ if (_size > 0) _stack[--_size] = 0; }
 };
 
-
 class EventList {
 protected:
 	OSystem::Event	_stack[100];

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -d -r1.173 -r1.174
--- scummvm.cpp	13 Jul 2002 18:32:09 -0000	1.173
+++ scummvm.cpp	13 Jul 2002 22:41:28 -0000	1.174
@@ -1493,7 +1493,6 @@
 	g_mixer = &scumm->_mixer[0];
 	/* END HACK */
 
-//	scumm->_fullScreen = detector->_fullScreen;
 	scumm->_debugMode = detector->_debugMode;
 	scumm->_bootParam = detector->_bootParam;
 	scumm->_gameDataPath = detector->_gameDataPath;





More information about the Scummvm-git-logs mailing list