Started to prepare the gui for runtime resolution switches.
(some little things could be missing yet though) svn-id: r22017
This commit is contained in:
parent
ec7e734adb
commit
30787714d3
20 changed files with 255 additions and 37 deletions
|
@ -344,10 +344,7 @@ void PopUpDialog::drawMenuEntry(int entry, bool hilite) {
|
|||
|
||||
PopUpWidget::PopUpWidget(GuiObject *boss, String name, const String &label, uint labelWidth)
|
||||
: Widget(boss, name), CommandSender(boss), _label(label), _labelWidth(labelWidth) {
|
||||
_ws = g_gui.getWidgetSize();
|
||||
|
||||
_leftPadding = g_gui.evaluator()->getVar("PopUpWidget.leftPadding", 0);
|
||||
_rightPadding = g_gui.evaluator()->getVar("PopUpWidget.rightPadding", 0);
|
||||
handleScreenChanged();
|
||||
|
||||
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS;
|
||||
setHints(THEME_HINT_SAVE_BACKGROUND);
|
||||
|
@ -371,6 +368,15 @@ void PopUpWidget::handleMouseDown(int x, int y, int button, int clickCount) {
|
|||
}
|
||||
}
|
||||
|
||||
void PopUpWidget::handleScreenChanged() {
|
||||
_ws = g_gui.getWidgetSize();
|
||||
|
||||
_leftPadding = g_gui.evaluator()->getVar("PopUpWidget.leftPadding", 0);
|
||||
_rightPadding = g_gui.evaluator()->getVar("PopUpWidget.rightPadding", 0);
|
||||
|
||||
Widget::handleScreenChanged();
|
||||
}
|
||||
|
||||
void PopUpWidget::appendEntry(const String &entry, uint32 tag) {
|
||||
Entry e;
|
||||
e.name = entry;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue