diff options
author | Max Horn | 2002-07-08 00:10:11 +0000 |
---|---|---|
committer | Max Horn | 2002-07-08 00:10:11 +0000 |
commit | c9b1d393b836dc4239a42c0efad7712fb786930f (patch) | |
tree | 613ba6e70de76d499adbe793652289ca2b64c6aa /gui/widget.cpp | |
parent | c3b606cd9b0b0445b0360f9a95225186252ae1c1 (diff) | |
download | scummvm-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.cpp | 12 |
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; } |