aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/EditTextWidget.cpp8
-rw-r--r--gui/EditTextWidget.h2
-rw-r--r--gui/ListWidget.cpp4
-rw-r--r--gui/ListWidget.h2
-rw-r--r--gui/PopUpWidget.cpp6
-rw-r--r--gui/PopUpWidget.h2
-rw-r--r--gui/TabWidget.cpp6
-rw-r--r--gui/TabWidget.h2
-rw-r--r--gui/about.cpp4
-rw-r--r--gui/about.h2
-rw-r--r--gui/console.cpp6
-rw-r--r--gui/console.h2
-rw-r--r--gui/dialog.cpp6
-rw-r--r--gui/dialog.h2
-rw-r--r--gui/launcher.cpp10
-rw-r--r--gui/launcher.h2
-rw-r--r--gui/newgui.cpp6
-rw-r--r--gui/object.h2
-rw-r--r--gui/options.cpp4
-rw-r--r--gui/options.h2
-rw-r--r--gui/widget.h2
21 files changed, 41 insertions, 41 deletions
diff --git a/gui/EditTextWidget.cpp b/gui/EditTextWidget.cpp
index ffff3671fb..239c4a613a 100644
--- a/gui/EditTextWidget.cpp
+++ b/gui/EditTextWidget.cpp
@@ -32,7 +32,7 @@ EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, cons
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE;
_type = kEditTextWidget;
- handleScreenChanged();
+ reflowLayout();
setEditString(text);
}
@@ -42,7 +42,7 @@ EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String
_type = kEditTextWidget;
_hints |= THEME_HINT_USE_SHADOW;
- handleScreenChanged();
+ reflowLayout();
setEditString(text);
}
@@ -51,8 +51,8 @@ void EditTextWidget::setEditString(const String &str) {
_backupString = str;
}
-void EditTextWidget::handleScreenChanged() {
- EditableWidget::handleScreenChanged();
+void EditTextWidget::reflowLayout() {
+ EditableWidget::reflowLayout();
_leftPadding = g_gui.evaluator()->getVar("EditTextWidget.leftPadding", 0);
_rightPadding = g_gui.evaluator()->getVar("EditTextWidget.rightPadding", 0);
diff --git a/gui/EditTextWidget.h b/gui/EditTextWidget.h
index faee7cfd43..1d61e7becb 100644
--- a/gui/EditTextWidget.h
+++ b/gui/EditTextWidget.h
@@ -47,7 +47,7 @@ public:
virtual bool wantsFocus() { return true; }
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
protected:
void drawWidget(bool hilite);
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp
index ca4e60cd30..e0ce81cff2 100644
--- a/gui/ListWidget.cpp
+++ b/gui/ListWidget.cpp
@@ -446,8 +446,8 @@ void ListWidget::abortEditMode() {
g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
}
-void ListWidget::handleScreenChanged() {
- Widget::handleScreenChanged();
+void ListWidget::reflowLayout() {
+ Widget::reflowLayout();
_leftPadding = g_gui.evaluator()->getVar("ListWidget.leftPadding", 0);
_rightPadding = g_gui.evaluator()->getVar("ListWidget.rightPadding", 0);
diff --git a/gui/ListWidget.h b/gui/ListWidget.h
index 8ce6ede3de..a51452e8e5 100644
--- a/gui/ListWidget.h
+++ b/gui/ListWidget.h
@@ -93,7 +93,7 @@ public:
virtual bool handleKeyUp(uint16 ascii, int keycode, int modifiers);
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
virtual bool wantsFocus() { return true; }
diff --git a/gui/PopUpWidget.cpp b/gui/PopUpWidget.cpp
index 81ef30bee1..f7cd8c22e8 100644
--- a/gui/PopUpWidget.cpp
+++ b/gui/PopUpWidget.cpp
@@ -344,7 +344,7 @@ void PopUpDialog::drawMenuEntry(int entry, bool hilite) {
PopUpWidget::PopUpWidget(GuiObject *boss, const String &name, const String &label, uint labelWidth)
: Widget(boss, name), CommandSender(boss), _label(label), _labelWidth(labelWidth) {
- handleScreenChanged();
+ reflowLayout();
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS;
setHints(THEME_HINT_SAVE_BACKGROUND);
@@ -369,12 +369,12 @@ void PopUpWidget::handleMouseDown(int x, int y, int button, int clickCount) {
}
}
-void PopUpWidget::handleScreenChanged() {
+void PopUpWidget::reflowLayout() {
_leftPadding = g_gui.evaluator()->getVar("PopUpWidget.leftPadding", 0);
_rightPadding = g_gui.evaluator()->getVar("PopUpWidget.rightPadding", 0);
_labelSpacing = g_gui.evaluator()->getVar("PopUpWidget.labelSpacing", 0);
- Widget::handleScreenChanged();
+ Widget::reflowLayout();
}
void PopUpWidget::appendEntry(const String &entry, uint32 tag) {
diff --git a/gui/PopUpWidget.h b/gui/PopUpWidget.h
index c94a64fd9b..b2bdf463af 100644
--- a/gui/PopUpWidget.h
+++ b/gui/PopUpWidget.h
@@ -82,7 +82,7 @@ public:
void handleMouseEntered(int button) { setFlags(WIDGET_HILITED); draw(); }
void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED); draw(); }
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
protected:
void drawWidget(bool hilite);
};
diff --git a/gui/TabWidget.cpp b/gui/TabWidget.cpp
index 32ed29dfc0..dbeebc772c 100644
--- a/gui/TabWidget.cpp
+++ b/gui/TabWidget.cpp
@@ -169,13 +169,13 @@ bool TabWidget::handleKeyDown(uint16 ascii, int keycode, int modifiers) {
return Widget::handleKeyDown(ascii, keycode, modifiers);
}
-void TabWidget::handleScreenChanged() {
- Widget::handleScreenChanged();
+void TabWidget::reflowLayout() {
+ Widget::reflowLayout();
for (uint i = 0; i < _tabs.size(); ++i) {
Widget *w = _tabs[i].firstWidget;
while (w) {
- w->handleScreenChanged();
+ w->reflowLayout();
w = w->next();
}
}
diff --git a/gui/TabWidget.h b/gui/TabWidget.h
index 36dea14030..7ccf6f3d2f 100644
--- a/gui/TabWidget.h
+++ b/gui/TabWidget.h
@@ -80,7 +80,7 @@ public:
virtual bool handleKeyDown(uint16 ascii, int keycode, int modifiers);
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
virtual void draw();
diff --git a/gui/about.cpp b/gui/about.cpp
index 55319bdc46..7236a40f0f 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -308,8 +308,8 @@ void AboutDialog::handleKeyUp(uint16 ascii, int keycode, int modifiers) {
close();
}
-void AboutDialog::handleScreenChanged() {
- Dialog::handleScreenChanged();
+void AboutDialog::reflowLayout() {
+ Dialog::reflowLayout();
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
diff --git a/gui/about.h b/gui/about.h
index 40fa35d8ba..715970b596 100644
--- a/gui/about.h
+++ b/gui/about.h
@@ -53,7 +53,7 @@ public:
void handleKeyDown(uint16 ascii, int keycode, int modifiers);
void handleKeyUp(uint16 ascii, int keycode, int modifiers);
- void handleScreenChanged();
+ void reflowLayout();
};
} // End of namespace GUI
diff --git a/gui/console.cpp b/gui/console.cpp
index 464216a0ad..a8ad636761 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -162,7 +162,7 @@ void ConsoleDialog::open() {
// the console, or even outright crashes. This means _scrollLine is not
// preserved, but that's a tiny sacrifice.
- handleScreenChanged();
+ reflowLayout();
Dialog::open();
if (_promptStartPos == -1) {
@@ -214,7 +214,7 @@ void ConsoleDialog::drawLine(int line, bool restoreBg) {
}
}
-void ConsoleDialog::handleScreenChanged() {
+void ConsoleDialog::reflowLayout() {
init();
_scrollLine = _promptEndPos / kLineWidth;
@@ -222,7 +222,7 @@ void ConsoleDialog::handleScreenChanged() {
_scrollLine = _linesPerPage - 1;
updateScrollBuffer();
- Dialog::handleScreenChanged();
+ Dialog::reflowLayout();
draw();
}
diff --git a/gui/console.h b/gui/console.h
index ebe93b0e56..8d81d26e03 100644
--- a/gui/console.h
+++ b/gui/console.h
@@ -105,7 +105,7 @@ public:
void drawDialog();
void handleTickle();
- void handleScreenChanged();
+ void reflowLayout();
void handleMouseWheel(int x, int y, int direction);
void handleKeyDown(uint16 ascii, int keycode, int modifiers);
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index 043777fdb2..11001a42e9 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -98,7 +98,7 @@ void Dialog::close() {
releaseFocus();
}
-void Dialog::handleScreenChanged() {
+void Dialog::reflowLayout() {
// The screen has changed. That means the screen visual may also have
// changed, so any cached image may be invalid. The subsequent redraw
// should be treated as the very first draw.
@@ -106,12 +106,12 @@ void Dialog::handleScreenChanged() {
_drawingHints |= THEME_HINT_FIRST_DRAW;
Widget *w = _firstWidget;
while (w) {
- w->handleScreenChanged();
+ w->reflowLayout();
w->setHints(THEME_HINT_FIRST_DRAW);
w = w->_next;
}
- GuiObject::handleScreenChanged();
+ GuiObject::reflowLayout();
}
void Dialog::releaseFocus() {
diff --git a/gui/dialog.h b/gui/dialog.h
index 4371cd3d4e..f418772ef0 100644
--- a/gui/dialog.h
+++ b/gui/dialog.h
@@ -62,7 +62,7 @@ public:
void releaseFocus();
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
protected:
virtual void open();
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index f212b4828b..a41615668c 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -116,7 +116,7 @@ class EditGameDialog : public OptionsDialog {
public:
EditGameDialog(const String &domain, const String &desc);
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
void open();
void close();
@@ -267,8 +267,8 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
new ButtonWidget(this, "gameoptions_ok", "OK", kOKCmd, 0);
}
-void EditGameDialog::handleScreenChanged() {
- OptionsDialog::handleScreenChanged();
+void EditGameDialog::reflowLayout() {
+ OptionsDialog::reflowLayout();
int labelWidth = g_gui.evaluator()->getVar("gameOptionsLabelWidth");
@@ -805,7 +805,7 @@ void LauncherDialog::updateButtons() {
}
}
-void LauncherDialog::handleScreenChanged() {
+void LauncherDialog::reflowLayout() {
#ifndef DISABLE_FANCY_THEMES
if (g_gui.evaluator()->getVar("launcher_logo.visible") == 1) {
StaticTextWidget *ver = (StaticTextWidget*)findWidget("launcher_version");
@@ -839,7 +839,7 @@ void LauncherDialog::handleScreenChanged() {
_w = g_system->getOverlayWidth();
_h = g_system->getOverlayHeight();
- Dialog::handleScreenChanged();
+ Dialog::reflowLayout();
}
} // End of namespace GUI
diff --git a/gui/launcher.h b/gui/launcher.h
index a8c76f4cfe..5ed1347454 100644
--- a/gui/launcher.h
+++ b/gui/launcher.h
@@ -51,7 +51,7 @@ protected:
StringList _domains;
BrowserDialog *_browser;
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
void updateListing();
void updateButtons();
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 14aeff06c1..a4904c5b8c 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -56,10 +56,10 @@ enum {
// HACK. FIXME. This doesn't belong here. But otherwise it creates compilation problems
GuiObject::GuiObject(const Common::String &name) : _firstWidget(0) {
_name = name;
- handleScreenChanged();
+ reflowLayout();
}
-void GuiObject::handleScreenChanged() {
+void GuiObject::reflowLayout() {
if (!_name.empty()) {
if ((_x = g_gui.evaluator()->getVar(_name + ".x")) == EVAL_UNDEF_VAR)
error("Undefined variable %s.x", _name.c_str());
@@ -262,7 +262,7 @@ void NewGui::runLoop() {
_theme->refresh();
// refresh all dialogs
for (int i = 0; i < _dialogStack.size(); ++i) {
- _dialogStack[i]->handleScreenChanged();
+ _dialogStack[i]->reflowLayout();
}
// We need to redraw immediately. Otherwise
// some other event may cause a widget to be
diff --git a/gui/object.h b/gui/object.h
index 60e51e3b94..b328b852f9 100644
--- a/gui/object.h
+++ b/gui/object.h
@@ -78,7 +78,7 @@ public:
virtual void draw() = 0;
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
protected:
virtual void releaseFocus() = 0;
diff --git a/gui/options.cpp b/gui/options.cpp
index 3d03722284..ee04fb31a5 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -606,8 +606,8 @@ int OptionsDialog::getSubtitleMode(bool subtitles, bool speech_mute) {
return 2;
}
-void OptionsDialog::handleScreenChanged() {
- Dialog::handleScreenChanged();
+void OptionsDialog::reflowLayout() {
+ Dialog::reflowLayout();
int labelWidth = g_gui.evaluator()->getVar("tabPopupsLabelW");
diff --git a/gui/options.h b/gui/options.h
index cbbac85a00..136b73b0e9 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -49,7 +49,7 @@ public:
void close();
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
enum {
kOKCmd = 'ok '
diff --git a/gui/widget.h b/gui/widget.h
index 436098bf42..99759a777b 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -128,7 +128,7 @@ public:
virtual bool handleKeyUp(uint16 ascii, int keycode, int modifiers) { return false; } // Return true if the event was handled
virtual void handleTickle() {}
- virtual void handleScreenChanged() { GuiObject::handleScreenChanged(); }
+ virtual void reflowLayout() { GuiObject::reflowLayout(); }
void draw();
void receivedFocus() { _hasFocus = true; receivedFocusWidget(); }