[Scummvm-cvs-logs] CVS: scummvm/gui dialog.cpp,1.7,1.8 widget.cpp,1.6,1.7
Max Horn
fingolfin at users.sourceforge.net
Sun Jul 7 17:11:05 CEST 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm newgui.cpp,1.5,1.6 newgui.h,1.5,1.6
- Next message: [Scummvm-cvs-logs] CVS: scummvm init.cpp,1.12,1.13 newgui.cpp,1.6,1.7 newgui.h,1.6,1.7 scummvm.cpp,1.168,1.169
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/gui
In directory usw-pr-cvs1:/tmp/cvs-serv26533/gui
Modified Files:
dialog.cpp widget.cpp
Log Message:
delay creation of dialogs till they are used; fixed new pause dialog & use it instead of the old one; dirty area handling in new gui code is more logical/useful now
Index: dialog.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/dialog.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- dialog.cpp 7 Jul 2002 23:37:47 -0000 1.7
+++ dialog.cpp 8 Jul 2002 00:10:11 -0000 1.8
@@ -29,6 +29,7 @@
_gui->clearArea(_x, _y, _w, _h);
_gui->box(_x, _y, _w, _h);
+ _gui->setAreaDirty(_x, _y, _w, _h);
while (w) {
w->draw();
@@ -194,5 +195,5 @@
PauseDialog::PauseDialog(NewGui *gui)
: Dialog (gui, 50, 80, 220, 16)
{
- addResText(2, 2, 220, 16, 10);
+ addResText(4, 4, 220, 16, 10);
}
Index: widget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/widget.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- widget.cpp 7 Jul 2002 23:37:47 -0000 1.6
+++ widget.cpp 8 Jul 2002 00:10:11 -0000 1.7
@@ -34,6 +34,8 @@
void Widget::draw()
{
+ NewGui *gui = _boss->_gui;
+
if (_flags & WIDGET_INVISIBLE)
return;
@@ -43,24 +45,26 @@
// Clear background
if (_flags & WIDGET_CLEARBG)
- _boss->_gui->clearArea(_x, _y, _w, _h);
+ gui->clearArea(_x, _y, _w, _h);
// Draw border
if (_flags & WIDGET_BORDER) {
- _boss->_gui->box(_x, _y, _w, _h);
+ gui->box(_x, _y, _w, _h);
_x += 4;
_y += 4;
}
// Now perform the actual widget draw
drawWidget(_flags & WIDGET_HILITED);
+
+ // Flag the draw area as dirty
+ gui->setAreaDirty(_x, _y, _w, _h);
+ // Restore x/y
if (_flags & WIDGET_BORDER) {
_x -= 4;
_y -= 4;
}
-
- // Restore x/y
_x -= _boss->_x;
_y -= _boss->_y;
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm newgui.cpp,1.5,1.6 newgui.h,1.5,1.6
- Next message: [Scummvm-cvs-logs] CVS: scummvm init.cpp,1.12,1.13 newgui.cpp,1.6,1.7 newgui.h,1.6,1.7 scummvm.cpp,1.168,1.169
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list