diff options
Diffstat (limited to 'gui/dialog.cpp')
-rw-r--r-- | gui/dialog.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index ef396301be..3b302ff36a 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -42,18 +42,15 @@ namespace GUI { * ... */ -Dialog::Dialog(int x, int y, int w, int h, bool dimsInactive_) +Dialog::Dialog(int x, int y, int w, int h) : GuiObject(x, y, w, h), - _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _visible(false), _drawingHints(0), - _dimsInactive(dimsInactive_) { - _drawingHints = THEME_HINT_FIRST_DRAW | THEME_HINT_SAVE_BACKGROUND; -} + _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _visible(false), + _backgroundType(GUI::Theme::kDialogBackgroundDefault) {} -Dialog::Dialog(const Common::String &name, bool dimsInactive_) +Dialog::Dialog(const Common::String &name) : GuiObject(name), - _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _visible(false), _drawingHints(0), - _dimsInactive(dimsInactive_) { - _drawingHints = THEME_HINT_FIRST_DRAW | THEME_HINT_SAVE_BACKGROUND; + _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _visible(false), + _backgroundType(GUI::Theme::kDialogBackgroundDefault) { // It may happen that we have 3x scaler in launcher (960xY) and then 640x480 // game will be forced to 1x. At this stage GUI will not be aware of @@ -113,11 +110,9 @@ void Dialog::reflowLayout() { // changed, so any cached image may be invalid. The subsequent redraw // should be treated as the very first draw. - _drawingHints |= THEME_HINT_FIRST_DRAW; Widget *w = _firstWidget; while (w) { w->reflowLayout(); - w->setHints(THEME_HINT_FIRST_DRAW); w = w->_next; } @@ -132,7 +127,11 @@ void Dialog::releaseFocus() { } void Dialog::draw() { - g_gui._needRedraw = true; + //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::NewGui::kRedrawTopDialog; } void Dialog::drawDialog() { @@ -140,12 +139,12 @@ void Dialog::drawDialog() { if (!isVisible()) return; - g_gui.theme()->drawDialogBackground(Common::Rect(_x, _y, _x+_w, _y+_h), _drawingHints); - _drawingHints &= ~THEME_HINT_FIRST_DRAW; + g_gui.theme()->drawDialogBackground(Common::Rect(_x, _y, _x+_w, _y+_h), _backgroundType); // Draw all children Widget *w = _firstWidget; while (w) { + //if (w->_debugVisible) w->draw(); w = w->_next; } |