aboutsummaryrefslogtreecommitdiff
path: root/gui/dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/dialog.cpp')
-rw-r--r--gui/dialog.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index 24b3db4d6d..408387b662 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -153,12 +153,12 @@ void Dialog::releaseFocus() {
}
}
-void Dialog::draw() {
- //TANOKU - FIXME when is this enabled? what does this do?
- // Update: called on tab drawing, mainly...
- // we can pass this as open a new dialog or something
-// g_gui._needRedraw = true;
- g_gui._redrawStatus = GUI::GuiManager::kRedrawTopDialog;
+void Dialog::markWidgetsAsDirty() {
+ Widget *w = _firstWidget;
+ while (w) {
+ w->markAsDirty();
+ w = w->_next;
+ }
}
void Dialog::drawDialog() {
@@ -168,6 +168,15 @@ void Dialog::drawDialog() {
g_gui.theme()->drawDialogBackground(Common::Rect(_x, _y, _x+_w, _y+_h), _backgroundType);
+ markWidgetsAsDirty();
+ drawWidgets();
+}
+
+void Dialog::drawWidgets() {
+
+ if (!isVisible())
+ return;
+
// Draw all children
Widget *w = _firstWidget;
while (w) {