aboutsummaryrefslogtreecommitdiff
path: root/gui/widget.cpp
diff options
context:
space:
mode:
authorMax Horn2002-07-08 00:10:11 +0000
committerMax Horn2002-07-08 00:10:11 +0000
commitc9b1d393b836dc4239a42c0efad7712fb786930f (patch)
tree613ba6e70de76d499adbe793652289ca2b64c6aa /gui/widget.cpp
parentc3b606cd9b0b0445b0360f9a95225186252ae1c1 (diff)
downloadscummvm-rg350-c9b1d393b836dc4239a42c0efad7712fb786930f.tar.gz
scummvm-rg350-c9b1d393b836dc4239a42c0efad7712fb786930f.tar.bz2
scummvm-rg350-c9b1d393b836dc4239a42c0efad7712fb786930f.zip
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
svn-id: r4487
Diffstat (limited to 'gui/widget.cpp')
-rw-r--r--gui/widget.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 38033a2d06..ecc4c66608 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -34,6 +34,8 @@ Widget::Widget (Dialog *boss, int x, int y, int w, int h)
void Widget::draw()
{
+ NewGui *gui = _boss->_gui;
+
if (_flags & WIDGET_INVISIBLE)
return;
@@ -43,24 +45,26 @@ void Widget::draw()
// 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;
}