diff options
Diffstat (limited to 'gui/dialog.cpp')
-rw-r--r-- | gui/dialog.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 0f264c5d6a..0bccfb91ab 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -106,9 +106,12 @@ void Dialog::handleScreenChanged() { _drawingHints |= THEME_HINT_FIRST_DRAW; Widget *w = _firstWidget; while (w) { + w->handleScreenChanged(); w->setHints(THEME_HINT_FIRST_DRAW); w = w->_next; } + + GuiObject::handleScreenChanged(); } void Dialog::releaseFocus() { @@ -304,6 +307,28 @@ Widget *Dialog::findWidget(int x, int y) { return Widget::findWidgetInChain(_firstWidget, x, y); } +Widget *Dialog::findWidget(const char *name) { + return Widget::findWidgetInChain(_firstWidget, name); +} + +void Dialog::deleteWidget(Widget *del) { + Widget *w = _firstWidget; + + if (del == _firstWidget) { + _firstWidget = _firstWidget->_next; + return; + } + + w = _firstWidget; + while (w) { + if (w->_next == del) { + w->_next = w->_next->_next; + return; + } + w = w->_next; + } +} + ButtonWidget *Dialog::addButton(GuiObject *boss, int x, int y, const Common::String &label, uint32 cmd, char hotkey, WidgetSize ws) { int w = kButtonWidth; int h = kButtonHeight; |