[Scummvm-cvs-logs] CVS: scummvm/gui dialog.cpp,1.34,1.35
Max Horn
fingolfin at users.sourceforge.net
Sat Aug 3 18:19:02 CEST 2002
Update of /cvsroot/scummvm/scummvm/gui
In directory usw-pr-cvs1:/tmp/cvs-serv26380/gui
Modified Files:
dialog.cpp
Log Message:
Fixed (worked around?) the nested dialog redraw bug; slightly changed the way mouseMoved events are handled in class Dialog
Index: dialog.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/dialog.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- dialog.cpp 4 Aug 2002 00:44:49 -0000 1.34
+++ dialog.cpp 4 Aug 2002 01:18:06 -0000 1.35
@@ -32,10 +32,14 @@
/*
* TODO list
- * - if save or load fails (e.g. due to disk full/directory write protected),
+ * - If saving or loading fails (e.g. due to disk full/directory write protected),
* display an error dialog?
* - The user can edit the name of the autosave game. Of course this will not
* do anything, but we should still prevent this.
+ * - add some sense of the window being "active" (i.e. in front) or not. If it
+ * was inactive and just became active, reset certain vars (like who is focused).
+ * Maybe we should just add lostFocus and receivedFocus methods to Dialog, just
+ * like we have for class Widget?
* ...
*/
@@ -195,21 +199,22 @@
_mouseWidget = 0;
w->handleMouseLeft(button);
}
-
- } else {
- w = findWidget(x, y);
- if (_mouseWidget != w) {
- if (_mouseWidget)
- _mouseWidget->handleMouseLeft(button);
- if (w)
- w->handleMouseEntered(button);
- _mouseWidget = w;
- }
+ w->handleMouseMoved(x - w->_x, y - w->_y, button);
+ }
- if (!w || !(w->getFlags() & WIDGET_TRACK_MOUSE)) {
- return;
- }
+ w = findWidget(x, y);
+
+ if (_mouseWidget != w) {
+ if (_mouseWidget)
+ _mouseWidget->handleMouseLeft(button);
+ if (w)
+ w->handleMouseEntered(button);
+ _mouseWidget = w;
+ }
+
+ if (!w || !(w->getFlags() & WIDGET_TRACK_MOUSE)) {
+ return;
}
w->handleMouseMoved(x - w->_x, y - w->_y, button);
More information about the Scummvm-git-logs
mailing list