diff options
author | Vicent Marti | 2008-08-05 16:23:17 +0000 |
---|---|---|
committer | Vicent Marti | 2008-08-05 16:23:17 +0000 |
commit | eb3d163439455fb941be0de73c1b3d28f3414c20 (patch) | |
tree | bfd4e9ae5943fecaf5b1fefc3abbcf5a2876d998 | |
parent | fdf485ea9bd84e07c8af1f2741af9078b6a9fcf6 (diff) | |
download | scummvm-rg350-eb3d163439455fb941be0de73c1b3d28f3414c20.tar.gz scummvm-rg350-eb3d163439455fb941be0de73c1b3d28f3414c20.tar.bz2 scummvm-rg350-eb3d163439455fb941be0de73c1b3d28f3414c20.zip |
Look, the launcher is rendered with the new layout parser.
svn-id: r33641
-rw-r--r-- | gui/ThemeEval.cpp | 28 | ||||
-rw-r--r-- | gui/ThemeEval.h | 34 | ||||
-rw-r--r-- | gui/ThemeParser.cpp | 18 | ||||
-rw-r--r-- | gui/ThemeParser.h | 2 | ||||
-rw-r--r-- | gui/ThemeRenderer.cpp | 8 | ||||
-rw-r--r-- | gui/launcher.cpp | 24 | ||||
-rw-r--r-- | gui/newgui.cpp | 10 | ||||
-rw-r--r-- | gui/themes/default.inc | 2 | ||||
-rw-r--r-- | gui/themes/modern.stx | 11 |
9 files changed, 85 insertions, 52 deletions
diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp index ec5c1e6abd..e13ccc0176 100644 --- a/gui/ThemeEval.cpp +++ b/gui/ThemeEval.cpp @@ -36,7 +36,7 @@ namespace GUI { -bool ThemeLayoutWidget::getWidgetData(const Common::String &name, int16 &x, int16 &y, int16 &w, int16 &h) { +bool ThemeLayoutWidget::getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) { if (name == _name) { x = _x; y = _y; w = _w; h = _h; @@ -46,7 +46,7 @@ bool ThemeLayoutWidget::getWidgetData(const Common::String &name, int16 &x, int1 return false; } -bool ThemeLayout::getWidgetData(const Common::String &name, int16 &x, int16 &y, int16 &w, int16 &h) { +bool ThemeLayout::getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) { for (uint i = 0; i < _children.size(); ++i) { if (_children[i]->getWidgetData(name, x, y, w, h)) return true; @@ -82,15 +82,19 @@ void ThemeLayoutVertical::reflowLayout() { if (i == 0) assert(_children[i]->getWidth() != -1); - - _children[i]->setX(curX); - _children[i]->setY(curY); if (_children[i]->getWidth() == -1) _children[i]->setWidth(_w - _paddingLeft - _paddingRight); if (_children[i]->getHeight() == -1) _children[i]->setHeight(getParentH() - _h - _spacing); + + _children[i]->setY(curY); + + if (_centered) + _children[i]->setX((_w >> 1) - (_children[i]->getWidth() >> 1)); + else + _children[i]->setX(curX); if (_reverse) { for (int j = i - 1; j >= 0; --j) @@ -121,9 +125,6 @@ void ThemeLayoutHorizontal::reflowLayout() { if (i == 0) assert(_children[i]->getHeight() != -1); - - _children[i]->setX(curX); - _children[i]->setY(curY); if (_children[i]->getHeight() == -1) _children[i]->setHeight(_h - _paddingTop - _paddingBottom); @@ -131,6 +132,9 @@ void ThemeLayoutHorizontal::reflowLayout() { if (_children[i]->getWidth() == -1) _children[i]->setWidth(getParentW() - _w - _spacing); + _children[i]->setX(curX); + _children[i]->setY(curY); + if (_reverse) { for (int j = i - 1; j >= 0; --j) _children[j]->setX(_children[i]->getWidth() + _spacing); @@ -172,13 +176,13 @@ void ThemeEval::addDialog(const Common::String &name) { _curLayout.push(layout); } -void ThemeEval::addLayout(ThemeLayout::LayoutType type, bool reverse) { +void ThemeEval::addLayout(ThemeLayout::LayoutType type, bool reverse, bool center) { ThemeLayout *layout = 0; if (type == ThemeLayout::kLayoutVertical) - layout = new ThemeLayoutVertical(_curLayout.top(), getVar("Globals.Layout.Spacing", 4), reverse); + layout = new ThemeLayoutVertical(_curLayout.top(), getVar("Globals.Layout.Spacing", 4), reverse, center); else if (type == ThemeLayout::kLayoutHorizontal) - layout = new ThemeLayoutHorizontal(_curLayout.top(), getVar("Globals.Layout.Spacing", 4), reverse); + layout = new ThemeLayoutHorizontal(_curLayout.top(), getVar("Globals.Layout.Spacing", 4), reverse, center); layout->setPadding( getVar("Globals.Padding.Left", 0), @@ -187,8 +191,6 @@ void ThemeEval::addLayout(ThemeLayout::LayoutType type, bool reverse) { getVar("Globals.Padding.Bottom", 0) ); - layout->setSpacing(4); - _curLayout.top()->addChild(layout); _curLayout.push(layout); } diff --git a/gui/ThemeEval.h b/gui/ThemeEval.h index 87af99c944..b412ba6798 100644 --- a/gui/ThemeEval.h +++ b/gui/ThemeEval.h @@ -51,7 +51,8 @@ public: ThemeLayout(ThemeLayout *p, const Common::String &name) : _parent(p), _name(name), _x(0), _y(0), _w(-1), _h(-1), _reverse(false), - _paddingLeft(0), _paddingRight(0), _paddingTop(0), _paddingBottom(0) { } + _paddingLeft(0), _paddingRight(0), _paddingTop(0), _paddingBottom(0), + _centered(false) { } virtual ~ThemeLayout() { _children.clear(); @@ -144,7 +145,7 @@ public: virtual LayoutType getLayoutType() = 0; virtual const char *getName() { return _name.c_str(); } - virtual bool getWidgetData(const Common::String &name, int16 &x, int16 &y, int16 &w, int16 &h); + virtual bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h); protected: int16 _x, _y, _w, _h; @@ -153,6 +154,7 @@ protected: Common::Array<ThemeLayout*> _children; ThemeLayout *_parent; bool _reverse; + bool _centered; Common::String _name; }; @@ -166,9 +168,11 @@ public: class ThemeLayoutVertical : public ThemeLayout { public: - ThemeLayoutVertical(ThemeLayout *p, int spacing, bool reverse) : ThemeLayout(p, "") { + ThemeLayoutVertical(ThemeLayout *p, int spacing, bool reverse, bool center) : + ThemeLayout(p, "") { _spacing = spacing; _reverse = reverse; + _centered = center; } void reflowLayout(); @@ -178,10 +182,11 @@ public: class ThemeLayoutHorizontal : public ThemeLayout { public: - ThemeLayoutHorizontal(ThemeLayout *p, int spacing, bool reverse) : + ThemeLayoutHorizontal(ThemeLayout *p, int spacing, bool reverse, bool center) : ThemeLayout(p, "") { _spacing = spacing; _reverse = reverse; + _centered = center; } void reflowLayout(); @@ -192,7 +197,7 @@ public: class ThemeLayoutWidget : public ThemeLayout { public: ThemeLayoutWidget(ThemeLayout *p, const Common::String &name) : ThemeLayout(p, name) {} - bool getWidgetData(const Common::String &name, int16 &x, int16 &y, int16 &w, int16 &h); + bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h); void reflowLayout() {} LayoutType getLayoutType() { return kLayoutWidget; } }; @@ -209,7 +214,7 @@ public: } } - bool getWidgetData(const Common::String &name, int16 &x, int16 &y, int16 &w, int16 &h) { return false; } + bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) { return false; } void reflowLayout() {} LayoutType getLayoutType() { return kLayoutWidget; } const char *getName() { return "SPACE"; } @@ -242,14 +247,27 @@ public: bool hasVar(const Common::String &name) { return _vars.contains(name); } void addDialog(const Common::String &name); - void addLayout(ThemeLayout::LayoutType type, bool reverse); + void addLayout(ThemeLayout::LayoutType type, bool reverse, bool center = false); void addWidget(const Common::String &name, int w, int h); void addSpacing(int size); + void addPadding(int16 l, int16 r, int16 t, int16 b) { + _curLayout.top()->setPadding(l, r, t, b); + } + void closeLayout() { _curLayout.pop(); } void closeDialog() { _curLayout.pop()->reflowLayout(); } - + bool getWidgetData(const Common::String &widget, int16 &x, int16 &y, uint16 &w, uint16 &h) { + Common::StringTokenizer tokenizer(widget, "."); + Common::String dialogName = "Dialog." + tokenizer.nextToken(); + Common::String widgetName = tokenizer.nextToken(); + + if (!_layouts.contains(dialogName)) + return false; + + return _layouts[dialogName]->getWidgetData(widgetName, x, y, w, h); + } void debugPrint() { printf("Debug variable list:\n"); diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp index 889acfedba..6c5c900f50 100644 --- a/gui/ThemeParser.cpp +++ b/gui/ThemeParser.cpp @@ -501,9 +501,23 @@ bool ThemeParser::parserCallback_dialog(ParserNode *node) { bool ThemeParser::parserCallback_layout(ParserNode *node) { if (node->values["type"] == "vertical") - _theme->themeEval()->addLayout(GUI::ThemeLayout::kLayoutVertical, node->values["direction"] == "bottom2top"); + _theme->themeEval()->addLayout(GUI::ThemeLayout::kLayoutVertical, + node->values["direction"] == "bottom2top", + node->values["center"] == "true"); + else if (node->values["type"] == "horizontal") - _theme->themeEval()->addLayout(GUI::ThemeLayout::kLayoutHorizontal, node->values["direction"] == "right2left"); + _theme->themeEval()->addLayout(GUI::ThemeLayout::kLayoutHorizontal, + node->values["direction"] == "right2left", + node->values["center"] == "true"); + + if (node->values.contains("padding")) { + int paddingL, paddingR, paddingT, paddingB; + + if (!parseIntegerKey(node->values["padding"].c_str(), 4, &paddingL, &paddingR, &paddingT, &paddingB)) + return false; + + _theme->themeEval()->addPadding(paddingL, paddingR, paddingT, paddingB); + } return true; } diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h index e94e8cbc8e..61d7262946 100644 --- a/gui/ThemeParser.h +++ b/gui/ThemeParser.h @@ -437,7 +437,7 @@ protected: XML_PROP(name, true) XML_KEY(layout) XML_PROP(type, true) - XML_PROP(align, false) + XML_PROP(center, false) XML_PROP(direction, false) XML_PROP(padding, false) XML_PROP(spacing, false) diff --git a/gui/ThemeRenderer.cpp b/gui/ThemeRenderer.cpp index f154f018b9..4a83982c8c 100644 --- a/gui/ThemeRenderer.cpp +++ b/gui/ThemeRenderer.cpp @@ -693,11 +693,11 @@ void ThemeRenderer::updateScreen() { _textQueue.clear(); } -// renderDirtyScreen(); + renderDirtyScreen(); - _vectorRenderer->fillSurface(); - themeEval()->debugDraw(_screen, _font); - _vectorRenderer->copyWholeFrame(_system); +// _vectorRenderer->fillSurface(); +// themeEval()->debugDraw(_screen, _font); +// _vectorRenderer->copyWholeFrame(_system); } void ThemeRenderer::renderDirtyScreen() { diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 34c4ebf474..451c089d3a 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -481,35 +481,35 @@ LauncherDialog::LauncherDialog() #ifndef DISABLE_FANCY_THEMES _logo = 0; if (g_gui.evaluator()->getVar("launcher_logo.visible") == 1 && g_gui.theme()->supportsImages()) { - _logo = new GraphicsWidget(this, "launcher_logo"); + _logo = new GraphicsWidget(this, "Launcher.Logo"); _logo->useThemeTransparency(true); _logo->setGfx(g_gui.theme()->getImageSurface(Theme::kImageLogo)); - new StaticTextWidget(this, "launcher_version", gScummVMVersionDate); + new StaticTextWidget(this, "Launcher.Version", gScummVMVersionDate); } else - new StaticTextWidget(this, "launcher_version", gScummVMFullVersion); + new StaticTextWidget(this, "Launcher.Version", gScummVMFullVersion); #else // Show ScummVM version - new StaticTextWidget(this, "launcher_version", gScummVMFullVersion); + new StaticTextWidget(this, "Launcher.Version", gScummVMFullVersion); #endif - new ButtonWidget(this, "launcher_quit_button", "Quit", kQuitCmd, 'Q'); - new ButtonWidget(this, "launcher_about_button", "About", kAboutCmd, 'B'); - new ButtonWidget(this, "launcher_options_button", "Options", kOptionsCmd, 'O'); + new ButtonWidget(this, "Launcher.QuitButton", "Quit", kQuitCmd, 'Q'); + new ButtonWidget(this, "Launcher.AboutButton", "About", kAboutCmd, 'B'); + new ButtonWidget(this, "Launcher.OptionsButton", "Options", kOptionsCmd, 'O'); _startButton = - new ButtonWidget(this, "launcher_start_button", "Start", kStartCmd, 'S'); + new ButtonWidget(this, "Launcher.StartButton", "Start", kStartCmd, 'S'); // Above the lowest button rows: two more buttons (directly below the list box) _addButton = - new ButtonWidget(this, "launcher_addGame_button", "Add Game...", kAddGameCmd, 'A'); + new ButtonWidget(this, "Launcher.AddGameButton", "Add Game...", kAddGameCmd, 'A'); _editButton = - new ButtonWidget(this, "launcher_editGame_button", "Edit Game...", kEditGameCmd, 'E'); + new ButtonWidget(this, "Launcher.EditGameButton", "Edit Game...", kEditGameCmd, 'E'); _removeButton = - new ButtonWidget(this, "launcher_removeGame_button", "Remove Game", kRemoveGameCmd, 'R'); + new ButtonWidget(this, "Launcher.RemoveGameButton", "Remove Game", kRemoveGameCmd, 'R'); // Add list with game titles - _list = new ListWidget(this, "launcher_list"); + _list = new ListWidget(this, "Launcher.GameList"); _list->setEditable(false); _list->setNumberingMode(kListNumberingOff); diff --git a/gui/newgui.cpp b/gui/newgui.cpp index 3c58633923..e829a2c6f5 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -58,15 +58,11 @@ enum { 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()); - if ((_y = g_gui.evaluator()->getVar(_name + ".y")) == EVAL_UNDEF_VAR) - error("Undefined variable %s.y", _name.c_str()); - _w = g_gui.evaluator()->getVar(_name + ".w"); - _h = g_gui.evaluator()->getVar(_name + ".h"); + if (!g_gui.xmlEval()->getWidgetData(_name, _x, _y, _w, _h)) + error("Could not load widget position for '%s'", _name.c_str()); if (_x < 0) - error("Widget <%s> has x < 0", _name.c_str()); + error("Widget <%s> has x < 0: %d", _name.c_str(), _x); if (_x >= g_system->getOverlayWidth()) error("Widget <%s> has x > %d", _name.c_str(), g_system->getOverlayWidth()); if (_x + _w > g_system->getOverlayWidth()) diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 04fd941819..d5ee4cc8b3 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -1 +1 @@ -" <render_info> <palette> <color name = 'darkred' rgb = '168, 42, 12' /> <color name = 'brightred' rgb = '200, 124, 104' /> <color name = 'xtrabrightred' rgb = '251, 241, 206' /> <color name = 'blandyellow' rgb = '247, 228, 166' /> <color name = 'bgreen' rgb = '96, 160, 8' /> <color name = 'blue' rgb = '0, 255, 255' /> <color name = 'black' rgb = '0, 0, 0' /> <color name = 'white' rgb = '255, 255, 255' /> <color name = 'shadowcolor' rgb = '63, 60, 17' /> </palette> <fonts> <font id = 'text_default' type = 'default' color = 'black' /> <font id = 'text_hover' type = 'default' color = 'bgreen' /> <font id = 'text_disabled' type = 'default' color = '128, 128, 128' /> <font id = 'text_inverted' type = 'default' color = '0, 0, 0' /> <font id = 'text_button' type = 'default' color = 'white' /> <font id = 'text_button_hover' type = 'default' color = 'blandyellow' /> </fonts> <defaults fill = 'gradient' fg_color = 'white' bevel_color = '237, 169, 72'/> <drawdata id = 'text_selection' cache = false> <drawstep func = 'square' fill = 'foreground' fg_color = 'bgreen' /> </drawdata> <drawdata id = 'mainmenu_bg' cache = false> <drawstep func = 'fill' fill = 'gradient' gradient_start = '208, 112, 8' gradient_end = '232, 192, 16' /> </drawdata> <drawdata id = 'separator' cache = false> <drawstep func = 'square' fill = 'foreground' height = '1' ypos = 'center' fg_color = 'black' /> </drawdata> <drawdata id = 'scrollbar_base' cache = false> <drawstep func = 'roundedsq' stroke = 1 radius = 6 fill = 'background' fg_color = '176, 164, 160' bg_color = '240, 228, 160' /> </drawdata> <drawdata id = 'scrollbar_handle_hover' cache = false> <drawstep func = 'roundedsq' stroke = 1 radius = 6 fill = 'gradient' fg_color = 'blandyellow' gradient_start = 'xtrabrightred' gradient_end = 'darkred' /> </drawdata> <drawdata id = 'scrollbar_handle_idle' cache = false> <drawstep func = 'roundedsq' stroke = 1 radius = 6 fill = 'gradient' fg_color = 'blandyellow' gradient_start = 'brightred' gradient_end = 'darkred' /> </drawdata> <drawdata id = 'scrollbar_button_idle' cache = false> <drawstep func = 'roundedsq' radius = '4' fill = 'none' fg_color = '176, 164, 160' stroke = 1 /> <drawstep func = 'triangle' fg_color = '0, 0, 0' fill = 'foreground' width = 'auto' height = 'auto' xpos = 'center' ypos = 'center' orientation = 'top' /> </drawdata> <drawdata id = 'scrollbar_button_hover' cache = false> <drawstep func = 'roundedsq' radius = '4' fill = 'background' fg_color = '120, 120, 120' bg_color = '206, 121, 99' stroke = 1 /> <drawstep func = 'triangle' fg_color = '0, 0, 0' fill = 'foreground' width = 'auto' height = 'auto' xpos = 'center' ypos = 'center' orientation = 'top' /> </drawdata> <drawdata id = 'tab_active' cache = false> <text font = 'text_default' vertical_align = 'center' horizontal_align = 'center' /> <drawstep func = 'tab' radius = '4' stroke = '0' fill = 'gradient' gradient_end = 'xtrabrightred' gradient_start = 'blandyellow' shadow = 3 /> </drawdata> <drawdata id = 'tab_inactive' cache = false> <text font = 'text_default' vertical_align = 'center' horizontal_align = 'center' /> <drawstep func = 'tab' radius = '4' stroke = '0' fill = 'foreground' fg_color = '240, 205, 118' shadow = 3 /> </drawdata> <drawdata id = 'tab_background' cache = false> <drawstep func = 'tab' radius = '8' stroke = '0' fill = 'foreground' fg_color = '232, 180, 81' shadow = 3 /> </drawdata> <drawdata id = 'widget_slider' cache = false> <drawstep func = 'roundedsq' stroke = 0 radius = 4 fill = 'foreground' fg_color = 'blandyellow' bevel = 1 bevel_color = 'shadowcolor' /> </drawdata> <drawdata id = 'slider_full' cache = false> <drawstep func = 'roundedsq' stroke = 1 radius = 4 fill = 'gradient' fg_color = '123, 112, 56' gradient_start = 'brightred' gradient_end = 'darkred' /> </drawdata> <drawdata id = 'slider_hover' cache = false> <drawstep func = 'roundedsq' stroke = 1 radius = 4 fill = 'gradient' fg_color = '123, 112, 56' gradient_start = 'xtrabrightred' gradient_end = 'darkred' /> </drawdata> <drawdata id = 'popup_idle' cache = false> <drawstep func = 'roundedsq' stroke = 0 radius = 4 fill = 'foreground' fg_color = '250, 237, 190' shadow = 2 /> <drawstep func = 'triangle' fg_color = '63, 60, 52' fill = 'foreground' width = 'height' height = 'auto' xpos = 'right' ypos = 'center' orientation = 'bottom' /> <text font = 'text_default' vertical_align = 'center' horizontal_align = 'right' /> </drawdata> <drawdata id = 'popup_hover' cache = false> <drawstep func = 'roundedsq' stroke = 0 radius = 4 fill = 'gradient' gradient_start = 'blandyellow' gradient_end = '250, 237, 190' shadow = 0 /> <drawstep func = 'triangle' fg_color = '63, 60, 52' fill = 'foreground' width = 'height' height = 'auto' xpos = 'right' ypos = 'center' orientation = 'bottom' /> <text font = 'text_hover' vertical_align = 'center' horizontal_align = 'right' /> </drawdata> <drawdata id = 'default_bg' cache = false> <drawstep func = 'roundedsq' radius = 12 stroke = 0 fg_color = 'xtrabrightred' fill = 'foreground' shadow = 3 /> </drawdata> <drawdata id = 'button_idle' cache = false> <text font = 'text_button' vertical_align = 'center' horizontal_align = 'center' /> <drawstep func = 'roundedsq' radius = '6' stroke = 1 fill = 'gradient' shadow = 0 fg_color = 'shadowcolor' gradient_start = 'brightred' gradient_end = 'darkred' bevel = 1 /> </drawdata> <drawdata id = 'button_hover' cache = false> <text font = 'text_button_hover' vertical_align = 'center' horizontal_align = 'center' /> <drawstep func = 'roundedsq' radius = '6' gradient_factor = 1 stroke = 1 fill = 'gradient' shadow = 0 fg_color = 'shadowcolor' gradient_start = 'xtrabrightred' gradient_end = 'darkred' bevel_color = 'xtrabrightred' bevel = 1 /> </drawdata> <drawdata id = 'button_disabled' cache = false> <text font = 'text_disabled' vertical_align = 'center' horizontal_align = 'center' /> <drawstep func = 'roundedsq' radius = '8' stroke = 0 fill = 'foreground' fg_color = '200, 200, 200' shadow = 3 /> </drawdata> <drawdata id = 'checkbox_disabled' cache = false> <text font = 'text_disabled' vertical_align = 'top' horizontal_align = 'left' /> <drawstep func = 'roundedsq' fill = 'none' radius = 4 fg_color = 'black' shadow = 0 bevel = 1 bevel_color = 'shadowcolor' /> </drawdata> <drawdata id = 'checkbox_selected' cache = false> <text font = 'text_default' vertical_align = 'top' horizontal_align = 'left' /> <drawstep func = 'roundedsq' fill = 'gradient' radius = 4 fg_color = 'white' gradient_start = 'brightred' gradient_end = 'darkred' shadow = 0 bevel = 1 bevel_color = 'shadowcolor' /> </drawdata> <drawdata id = 'checkbox_default' cache = false> <text font = 'text_default' vertical_align = 'top' horizontal_align = 'left' /> <drawstep func = 'roundedsq' fill = 'foreground' radius = 4 fg_color = 'blandyellow' shadow = 0 bevel = 1 bevel_color = 'shadowcolor' /> </drawdata> <drawdata id = 'widget_default' cache = false> <drawstep func = 'roundedsq' gradient_factor = 6 radius = '8' fill = 'gradient' gradient_start = '240, 224, 136' gradient_end = 'xtrabrightred' shadow = 3 /> </drawdata> </render_info> <layout_info> <globals> <def var = 'Widget.Size' value = '32' /> <def var = 'Line.Height' value = '16' /> <def var = 'Font.Height' value = '16' /> <def var = 'Padding.Bottom' value = '16' /> <def var = 'Padding.Left' value = '16' /> <def var = 'Padding.Right' value = '16' /> <def var = 'Padding.Top' value = '16' /> <widget name = 'Inset' pos = '23, 94' size = '666, 666' /> <widget name = 'Button' size = '120, 25' /> <widget name = 'Slider' size = '666, 666' /> <widget name = 'ListWidget' padding = '7, 5, 5, 5' /> <widget name = 'PopUpWidget' padding = '7, 5, 0, 0' /> <widget name = 'EditTextWidget' padding = '7, 5, 0, 0' /> <widget name = 'Console' padding = '7, 5, 5, 5' /> <widget name = 'TabWidget'> <child name = 'Tab' size = '75, 27' padding = '0, 0, 8, 0' /> <child name = 'NavButton' size = '15, 18' padding = '0, 3, 4, 0' /> </widget> </globals> <dialog name = 'Launcher'> <layout type = 'vertical' align = 'center'> <widget name = 'Version' width = '247' height = 'Globals.Line.Height' /> <widget name = 'Logo' width = '283' height = '80' /> <layout type = 'horizontal' direction = 'right2left'> <layout type = 'vertical'> <widget name = 'StartButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'AddGameButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'EditGameButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'RemoveGameButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'OptionsButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'AboutButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'QuittButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <space/> </layout> <widget name = 'GameList'/> </layout> </layout> </dialog> </layout_info> " +" <render_info> <palette> <color name = 'darkred' rgb = '168, 42, 12' /> <color name = 'brightred' rgb = '200, 124, 104' /> <color name = 'xtrabrightred' rgb = '251, 241, 206' /> <color name = 'blandyellow' rgb = '247, 228, 166' /> <color name = 'bgreen' rgb = '96, 160, 8' /> <color name = 'blue' rgb = '0, 255, 255' /> <color name = 'black' rgb = '0, 0, 0' /> <color name = 'white' rgb = '255, 255, 255' /> <color name = 'shadowcolor' rgb = '63, 60, 17' /> </palette> <fonts> <font id = 'text_default' type = 'default' color = 'black' /> <font id = 'text_hover' type = 'default' color = 'bgreen' /> <font id = 'text_disabled' type = 'default' color = '128, 128, 128' /> <font id = 'text_inverted' type = 'default' color = '0, 0, 0' /> <font id = 'text_button' type = 'default' color = 'white' /> <font id = 'text_button_hover' type = 'default' color = 'blandyellow' /> </fonts> <defaults fill = 'gradient' fg_color = 'white' bevel_color = '237, 169, 72'/> <drawdata id = 'text_selection' cache = false> <drawstep func = 'square' fill = 'foreground' fg_color = 'bgreen' /> </drawdata> <drawdata id = 'mainmenu_bg' cache = false> <drawstep func = 'fill' fill = 'gradient' gradient_start = '208, 112, 8' gradient_end = '232, 192, 16' /> </drawdata> <drawdata id = 'separator' cache = false> <drawstep func = 'square' fill = 'foreground' height = '1' ypos = 'center' fg_color = 'black' /> </drawdata> <drawdata id = 'scrollbar_base' cache = false> <drawstep func = 'roundedsq' stroke = 1 radius = 6 fill = 'background' fg_color = '176, 164, 160' bg_color = '240, 228, 160' /> </drawdata> <drawdata id = 'scrollbar_handle_hover' cache = false> <drawstep func = 'roundedsq' stroke = 1 radius = 6 fill = 'gradient' fg_color = 'blandyellow' gradient_start = 'xtrabrightred' gradient_end = 'darkred' /> </drawdata> <drawdata id = 'scrollbar_handle_idle' cache = false> <drawstep func = 'roundedsq' stroke = 1 radius = 6 fill = 'gradient' fg_color = 'blandyellow' gradient_start = 'brightred' gradient_end = 'darkred' /> </drawdata> <drawdata id = 'scrollbar_button_idle' cache = false> <drawstep func = 'roundedsq' radius = '4' fill = 'none' fg_color = '176, 164, 160' stroke = 1 /> <drawstep func = 'triangle' fg_color = '0, 0, 0' fill = 'foreground' width = 'auto' height = 'auto' xpos = 'center' ypos = 'center' orientation = 'top' /> </drawdata> <drawdata id = 'scrollbar_button_hover' cache = false> <drawstep func = 'roundedsq' radius = '4' fill = 'background' fg_color = '120, 120, 120' bg_color = '206, 121, 99' stroke = 1 /> <drawstep func = 'triangle' fg_color = '0, 0, 0' fill = 'foreground' width = 'auto' height = 'auto' xpos = 'center' ypos = 'center' orientation = 'top' /> </drawdata> <drawdata id = 'tab_active' cache = false> <text font = 'text_default' vertical_align = 'center' horizontal_align = 'center' /> <drawstep func = 'tab' radius = '4' stroke = '0' fill = 'gradient' gradient_end = 'xtrabrightred' gradient_start = 'blandyellow' shadow = 3 /> </drawdata> <drawdata id = 'tab_inactive' cache = false> <text font = 'text_default' vertical_align = 'center' horizontal_align = 'center' /> <drawstep func = 'tab' radius = '4' stroke = '0' fill = 'foreground' fg_color = '240, 205, 118' shadow = 3 /> </drawdata> <drawdata id = 'tab_background' cache = false> <drawstep func = 'tab' radius = '8' stroke = '0' fill = 'foreground' fg_color = '232, 180, 81' shadow = 3 /> </drawdata> <drawdata id = 'widget_slider' cache = false> <drawstep func = 'roundedsq' stroke = 0 radius = 4 fill = 'foreground' fg_color = 'blandyellow' bevel = 1 bevel_color = 'shadowcolor' /> </drawdata> <drawdata id = 'slider_full' cache = false> <drawstep func = 'roundedsq' stroke = 1 radius = 4 fill = 'gradient' fg_color = '123, 112, 56' gradient_start = 'brightred' gradient_end = 'darkred' /> </drawdata> <drawdata id = 'slider_hover' cache = false> <drawstep func = 'roundedsq' stroke = 1 radius = 4 fill = 'gradient' fg_color = '123, 112, 56' gradient_start = 'xtrabrightred' gradient_end = 'darkred' /> </drawdata> <drawdata id = 'popup_idle' cache = false> <drawstep func = 'roundedsq' stroke = 0 radius = 4 fill = 'foreground' fg_color = '250, 237, 190' shadow = 2 /> <drawstep func = 'triangle' fg_color = '63, 60, 52' fill = 'foreground' width = 'height' height = 'auto' xpos = 'right' ypos = 'center' orientation = 'bottom' /> <text font = 'text_default' vertical_align = 'center' horizontal_align = 'right' /> </drawdata> <drawdata id = 'popup_hover' cache = false> <drawstep func = 'roundedsq' stroke = 0 radius = 4 fill = 'gradient' gradient_start = 'blandyellow' gradient_end = '250, 237, 190' shadow = 0 /> <drawstep func = 'triangle' fg_color = '63, 60, 52' fill = 'foreground' width = 'height' height = 'auto' xpos = 'right' ypos = 'center' orientation = 'bottom' /> <text font = 'text_hover' vertical_align = 'center' horizontal_align = 'right' /> </drawdata> <drawdata id = 'default_bg' cache = false> <drawstep func = 'roundedsq' radius = 12 stroke = 0 fg_color = 'xtrabrightred' fill = 'foreground' shadow = 3 /> </drawdata> <drawdata id = 'button_idle' cache = false> <text font = 'text_button' vertical_align = 'center' horizontal_align = 'center' /> <drawstep func = 'roundedsq' radius = '6' stroke = 1 fill = 'gradient' shadow = 0 fg_color = 'shadowcolor' gradient_start = 'brightred' gradient_end = 'darkred' bevel = 1 /> </drawdata> <drawdata id = 'button_hover' cache = false> <text font = 'text_button_hover' vertical_align = 'center' horizontal_align = 'center' /> <drawstep func = 'roundedsq' radius = '6' gradient_factor = 1 stroke = 1 fill = 'gradient' shadow = 0 fg_color = 'shadowcolor' gradient_start = 'xtrabrightred' gradient_end = 'darkred' bevel_color = 'xtrabrightred' bevel = 1 /> </drawdata> <drawdata id = 'button_disabled' cache = false> <text font = 'text_disabled' vertical_align = 'center' horizontal_align = 'center' /> <drawstep func = 'roundedsq' radius = '8' stroke = 0 fill = 'foreground' fg_color = '200, 200, 200' shadow = 3 /> </drawdata> <drawdata id = 'checkbox_disabled' cache = false> <text font = 'text_disabled' vertical_align = 'top' horizontal_align = 'left' /> <drawstep func = 'roundedsq' fill = 'none' radius = 4 fg_color = 'black' shadow = 0 bevel = 1 bevel_color = 'shadowcolor' /> </drawdata> <drawdata id = 'checkbox_selected' cache = false> <text font = 'text_default' vertical_align = 'top' horizontal_align = 'left' /> <drawstep func = 'roundedsq' fill = 'gradient' radius = 4 fg_color = 'white' gradient_start = 'brightred' gradient_end = 'darkred' shadow = 0 bevel = 1 bevel_color = 'shadowcolor' /> </drawdata> <drawdata id = 'checkbox_default' cache = false> <text font = 'text_default' vertical_align = 'top' horizontal_align = 'left' /> <drawstep func = 'roundedsq' fill = 'foreground' radius = 4 fg_color = 'blandyellow' shadow = 0 bevel = 1 bevel_color = 'shadowcolor' /> </drawdata> <drawdata id = 'widget_default' cache = false> <drawstep func = 'roundedsq' gradient_factor = 6 radius = '8' fill = 'gradient' gradient_start = '240, 224, 136' gradient_end = 'xtrabrightred' shadow = 3 /> </drawdata> </render_info> <layout_info> <globals> <def var = 'Widget.Size' value = '32' /> <def var = 'Line.Height' value = '16' /> <def var = 'Font.Height' value = '16' /> <def var = 'Padding.Bottom' value = '16' /> <def var = 'Padding.Left' value = '16' /> <def var = 'Padding.Right' value = '16' /> <def var = 'Padding.Top' value = '16' /> <widget name = 'Inset' pos = '23, 94' size = '666, 666' /> <widget name = 'Button' size = '120, 25' /> <widget name = 'Slider' size = '666, 666' /> <widget name = 'ListWidget' padding = '7, 5, 5, 5' /> <widget name = 'PopUpWidget' padding = '7, 5, 0, 0' /> <widget name = 'EditTextWidget' padding = '7, 5, 0, 0' /> <widget name = 'Console' padding = '7, 5, 5, 5' /> <widget name = 'TabWidget'> <child name = 'Tab' size = '75, 27' padding = '0, 0, 8, 0' /> <child name = 'NavButton' size = '15, 18' padding = '0, 3, 4, 0' /> </widget> </globals> <dialog name = 'Launcher'> <layout type = 'vertical' center = 'true' padding = '23, 23, 8, 23'> <widget name = 'Version' width = '247' height = 'Globals.Line.Height' /> <widget name = 'Logo' width = '283' height = '80' /> <layout type = 'horizontal' direction = 'right2left' padding = '0, 0, 0, 0'> <layout type = 'vertical' padding = '16, 0, 0, 0'> <widget name = 'StartButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <space size = '16' /> <widget name = 'AddGameButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'EditGameButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'RemoveGameButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <space size = '16' /> <widget name = 'OptionsButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'AboutButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <space size = '16' /> <widget name = 'QuitButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <space/> </layout> <widget name = 'GameList'/> </layout> </layout> </dialog> </layout_info> " diff --git a/gui/themes/modern.stx b/gui/themes/modern.stx index b13dc1fc98..e4fc5d5c3e 100644 --- a/gui/themes/modern.stx +++ b/gui/themes/modern.stx @@ -465,7 +465,7 @@ </globals> <dialog name = 'Launcher'> - <layout type = 'vertical' align = 'center'> + <layout type = 'vertical' center = 'true' padding = '23, 23, 8, 23'> <widget name = 'Version' width = '247' height = 'Globals.Line.Height' @@ -474,12 +474,13 @@ width = '283' height = '80' /> - <layout type = 'horizontal' direction = 'right2left'> - <layout type = 'vertical'> + <layout type = 'horizontal' direction = 'right2left' padding = '0, 0, 0, 0'> + <layout type = 'vertical' padding = '16, 0, 0, 0'> <widget name = 'StartButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> + <space size = '16' /> <widget name = 'AddGameButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' @@ -492,6 +493,7 @@ width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> + <space size = '16' /> <widget name = 'OptionsButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' @@ -500,7 +502,8 @@ width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> - <widget name = 'QuittButton' + <space size = '16' /> + <widget name = 'QuitButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> |