diff options
author | Vicent Marti | 2008-08-06 10:50:28 +0000 |
---|---|---|
committer | Vicent Marti | 2008-08-06 10:50:28 +0000 |
commit | ef7a14dbe257da2a07464d566070f7a339b42f63 (patch) | |
tree | 7dba904c2373e9887a28fc51a641697b20f818a1 | |
parent | 4256c357912bd9c2b554c22f09a2d0304e9de9a2 (diff) | |
download | scummvm-rg350-ef7a14dbe257da2a07464d566070f7a339b42f63.tar.gz scummvm-rg350-ef7a14dbe257da2a07464d566070f7a339b42f63.tar.bz2 scummvm-rg350-ef7a14dbe257da2a07464d566070f7a339b42f63.zip |
Options menu fully parsed. Needs tweaking.
svn-id: r33657
-rw-r--r-- | gui/ThemeEval.cpp | 18 | ||||
-rw-r--r-- | gui/ThemeEval.h | 12 | ||||
-rw-r--r-- | gui/ThemeParser.cpp | 14 | ||||
-rw-r--r-- | gui/options.cpp | 2 | ||||
-rw-r--r-- | gui/themes/default.inc | 2 | ||||
-rw-r--r-- | gui/themes/modern.stx | 200 |
6 files changed, 215 insertions, 33 deletions
diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp index e2c34d8128..48629c306b 100644 --- a/gui/ThemeEval.cpp +++ b/gui/ThemeEval.cpp @@ -79,12 +79,9 @@ void ThemeLayoutVertical::reflowLayout() { if (i != _children.size() - 1) assert(_children[i]->getHeight() != -1); - - if (i == 0) - assert(_children[i]->getWidth() != -1); - + if (_children[i]->getWidth() == -1) - _children[i]->setWidth(_w - _paddingLeft - _paddingRight); + _children[i]->setWidth((_w == -1 ? getParentW() : _w) - _paddingLeft - _paddingRight); if (_children[i]->getHeight() == -1) _children[i]->setHeight(getParentH() - _h - _spacing); @@ -187,13 +184,16 @@ void ThemeEval::addDialog(const Common::String &name, const Common::String &over _curLayout.push(layout); } -void ThemeEval::addLayout(ThemeLayout::LayoutType type, bool reverse, bool center) { +void ThemeEval::addLayout(ThemeLayout::LayoutType type, int spacing, bool reverse, bool center) { ThemeLayout *layout = 0; + if (spacing == -1) + spacing = getVar("Globals.Layout.Spacing", 4); + if (type == ThemeLayout::kLayoutVertical) - layout = new ThemeLayoutVertical(_curLayout.top(), getVar("Globals.Layout.Spacing", 4), reverse, center); + layout = new ThemeLayoutVertical(_curLayout.top(), spacing, reverse, center); else if (type == ThemeLayout::kLayoutHorizontal) - layout = new ThemeLayoutHorizontal(_curLayout.top(), getVar("Globals.Layout.Spacing", 4), reverse, center); + layout = new ThemeLayoutHorizontal(_curLayout.top(), spacing, reverse, center); layout->setPadding( getVar("Globals.Padding.Left", 0), @@ -206,7 +206,7 @@ void ThemeEval::addLayout(ThemeLayout::LayoutType type, bool reverse, bool cente _curLayout.push(layout); } -void ThemeEval::addSpacing(int size) { +void ThemeEval::addSpace(int size) { ThemeLayout *space = new ThemeLayoutSpacing(_curLayout.top(), size); _curLayout.top()->addChild(space); } diff --git a/gui/ThemeEval.h b/gui/ThemeEval.h index 671a737336..77c15729ed 100644 --- a/gui/ThemeEval.h +++ b/gui/ThemeEval.h @@ -254,9 +254,9 @@ public: bool hasVar(const Common::String &name) { return _vars.contains(name); } void addDialog(const Common::String &name, const Common::String &overlays); - void addLayout(ThemeLayout::LayoutType type, bool reverse, bool center = false); + void addLayout(ThemeLayout::LayoutType type, int spacing, bool reverse, bool center = false); void addWidget(const Common::String &name, int w, int h); - void addSpacing(int size); + void addSpace(int size); void addPadding(int16 l, int16 r, int16 t, int16 b) { _curLayout.top()->setPadding(l, r, t, b); @@ -267,11 +267,11 @@ public: bool getWidgetData(const Common::String &widget, int16 &x, int16 &y, uint16 &w, uint16 &h) { Common::StringTokenizer tokenizer(widget, "."); + + if (widget.hasPrefix("Dialog.")) + tokenizer.nextToken(); + Common::String dialogName = "Dialog." + tokenizer.nextToken(); - - if (dialogName == "Dialog.Dialog") - dialogName = "Dialog." + tokenizer.nextToken(); - Common::String widgetName = tokenizer.nextToken(); if (!_layouts.contains(dialogName)) diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp index fafe2ccad7..edb801552c 100644 --- a/gui/ThemeParser.cpp +++ b/gui/ThemeParser.cpp @@ -499,14 +499,20 @@ bool ThemeParser::parserCallback_dialog(ParserNode *node) { } bool ThemeParser::parserCallback_layout(ParserNode *node) { + int spacing = -1; + + if (node->values.contains("spacing")) { + if (!parseIntegerKey(node->values["spacing"].c_str(), 1, &spacing)) + return false; + } if (node->values["type"] == "vertical") - _theme->themeEval()->addLayout(GUI::ThemeLayout::kLayoutVertical, + _theme->themeEval()->addLayout(GUI::ThemeLayout::kLayoutVertical, spacing, node->values["direction"] == "bottom2top", node->values["center"] == "true"); else if (node->values["type"] == "horizontal") - _theme->themeEval()->addLayout(GUI::ThemeLayout::kLayoutHorizontal, + _theme->themeEval()->addLayout(GUI::ThemeLayout::kLayoutHorizontal, spacing, node->values["direction"] == "right2left", node->values["center"] == "true"); @@ -518,6 +524,8 @@ bool ThemeParser::parserCallback_layout(ParserNode *node) { _theme->themeEval()->addPadding(paddingL, paddingR, paddingT, paddingB); } + + return true; } @@ -529,7 +537,7 @@ bool ThemeParser::parserCallback_space(ParserNode *node) { if (!parseIntegerKey(node->values["size"].c_str(), 1, &size)) return parserError("Invalid value for Spacing size."); - _theme->themeEval()->addSpacing(size); + _theme->themeEval()->addSpace(size); return true; } diff --git a/gui/options.cpp b/gui/options.cpp index 76c9f8ab82..b8b0ca70cb 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -675,7 +675,7 @@ GlobalOptionsDialog::GlobalOptionsDialog() // 2) The audio tab // tab->addTab("Audio"); - addAudioControls(tab, "GlobalOptions."); + addAudioControls(tab, "GlobalOptions_Audio."); addSubtitleControls(tab, "GlobalOptions_Audio."); tab->addTab("Volume"); diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 7ba64bbb83..bfe1e1ec8e 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' overlays = 'screen'> <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> <dialog name = 'GlobalOptions' overlays = 'Dialog.Launcher.GameList'> <layout type = 'vertical' padding = '0, 0, 0, 0' direction = 'bottom2top'> <layout type = 'horizontal' direction = 'right2left' padding = '16, 16, 16, 16'> <widget name = 'Ok' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'Cancel' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <space/> </layout> <widget name = 'TabWidget'/> </layout> </dialog> <dialog name = 'GlobalOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'> <layout type = 'vertical' padding = '16, 16, 16, 16'> <widget name = 'grModePopup' width = '512' height = '64' /> <widget name = 'grRenderPopup' width = '512' height = '64' /> <widget name = 'grAspectCheckbox' width = '256' height = '32' /> <widget name = 'grFullscreenCheckbox' width = '256' height = '32' /> </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 = 'OptionsLabel' size = '110, 16' /> <widget name = 'Button' size = '120, 25' /> <widget name = 'Slider' size = '256, 32' /> <widget name = 'PopUp' size = '-1, 19' /> <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' overlays = 'screen'> <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> <dialog name = 'GlobalOptions' overlays = 'Dialog.Launcher.GameList'> <layout type = 'vertical' padding = '0, 0, 0, 0' direction = 'bottom2top'> <layout type = 'horizontal' direction = 'right2left' padding = '16, 16, 16, 16'> <widget name = 'Ok' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'Cancel' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <space/> </layout> <widget name = 'TabWidget'/> </layout> </dialog> <dialog name = 'GlobalOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'> <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> <widget name = 'grModePopup' height = 'Globals.PopUp.Height' /> <widget name = 'grRenderPopup' height = 'Globals.PopUp.Height' /> <widget name = 'grAspectCheckbox' height = 'Globals.Line.Height' /> <widget name = 'grFullscreenCheckbox' height = 'Globals.Line.Height' /> </layout> </dialog> <dialog name = 'GlobalOptions_Audio' overlays = 'Dialog.GlobalOptions.TabWidget'> <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> <widget name = 'auMidiPopup' height = 'Globals.Line.Height' /> <widget name = 'auSampleRatePopup' height = 'Globals.Line.Height' /> <layout type = 'horizontal' padding = '0, 0, 0, 0'> <widget name = 'subToggleDesc' width = 'Globals.OptionsLabel.Width' height = 'Globals.OptionsLabel.Height' /> <widget name = 'subToggleButton' width = '150' height = 'Globals.Slider.Height' /> </layout> <layout type = 'horizontal' padding = '0, 0, 0, 0'> <widget name = 'subSubtitleSpeedDesc' width = 'Globals.OptionsLabel.Width' height = 'Globals.OptionsLabel.Height' /> <widget name = 'subSubtitleSpeedSlider' width = 'Globals.Slider.Width' height = 'Globals.Slider.Height' /> <widget name = 'subSubtitleSpeedLabel' width = '32' height = 'Globals.Line.Height' /> </layout> </layout> </dialog> <dialog name = 'GlobalOptions_Volume' overlays = 'Dialog.GlobalOptions.TabWidget'> <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> <layout type = 'horizontal' padding = '0, 0, 0, 0'> <widget name = 'vcMusicText' width = 'Globals.OptionsLabel.Width' height = 'Globals.OptionsLabel.Height' /> <widget name = 'vcMusicSlider' width = 'Globals.Slider.Width' height = 'Globals.Slider.Height' /> <widget name = 'vcMusicLabel' width = '32' height = 'Globals.Line.Height' /> </layout> <layout type = 'horizontal' padding = '0, 0, 0, 0'> <widget name = 'vcSfxText' width = 'Globals.OptionsLabel.Width' height = 'Globals.OptionsLabel.Height' /> <widget name = 'vcSfxSlider' width = 'Globals.Slider.Width' height = 'Globals.Slider.Height' /> <widget name = 'vcSfxLabel' width = '32' height = 'Globals.Line.Height' /> </layout> <layout type = 'horizontal' padding = '0, 0, 0, 0'> <widget name = 'vcSpeechText' width = 'Globals.OptionsLabel.Width' height = 'Globals.OptionsLabel.Height' /> <widget name = 'vcSpeechSlider' width = 'Globals.Slider.Width' height = 'Globals.Slider.Height' /> <widget name = 'vcSpeechLabel' width = '32' height = 'Globals.Line.Height' /> </layout> </layout> </dialog> <dialog name = 'GlobalOptions_MIDI' overlays = 'Dialog.GlobalOptions.TabWidget'> <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> <layout type = 'horizontal' padding = '0, 0, 0, 0'> <widget name = 'mcFontButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'mcFontClearButton' height = 'Globals.Line.Height' width = 'Globals.Line.Height' /> <widget name = 'mcFontPath' height = 'Globals.Line.Height' /> </layout> <widget name = 'mcMixedCheckbox' height = 'Globals.Line.Height' /> <widget name = 'mcMt32Checkbox' height = 'Globals.Line.Height' /> <widget name = 'mcGSCheckbox' height = 'Globals.Line.Height' /> <layout type = 'horizontal' padding = '0, 0, 0, 0'> <widget name = 'mcMidiGainText' width = 'Globals.OptionsLabel.Width' height = 'Globals.OptionsLabel.Height' /> <widget name = 'mcMidiGainSlider' width = 'Globals.Slider.Width' height = 'Globals.Slider.Height' /> <widget name = 'mcMidiGainLabel' width = '32' height = 'Globals.Line.Height' /> </layout> </layout> </dialog> <dialog name = 'GlobalOptions_Paths' overlays = 'Dialog.GlobalOptions.TabWidget'> <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'> <widget name = 'SaveButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'SavePath' height = 'Globals.Line.Height' /> </layout> <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'> <widget name = 'ThemeButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'ThemePath' height = 'Globals.Line.Height' /> </layout> <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'> <widget name = 'ExtraButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'ExtraPath' height = 'Globals.Line.Height' /> </layout> </layout> </dialog> <dialog name = 'GlobalOptions_Misc' overlays = 'Dialog.GlobalOptions.TabWidget'> <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'> <widget name = 'ThemeButton' width = 'Globals.Button.Width' height = 'Globals.Button.Height' /> <widget name = 'CurTheme' height = 'Globals.Line.Height' /> </layout> <widget name = 'AutosavePeriod' height = 'Globals.PopUp.Height' /> </layout> </dialog> </layout_info> " diff --git a/gui/themes/modern.stx b/gui/themes/modern.stx index 8d0e91ea0c..431ccb0d68 100644 --- a/gui/themes/modern.stx +++ b/gui/themes/modern.stx @@ -298,6 +298,10 @@ horizontal_align = 'right' /> </drawdata> + +/* Tanoku-TODO: text editing width + CARET! +/* <drawdata id = 'widget_textedit' cache = false> + <drawstep func = 'roundedsq' */ <drawdata id = 'default_bg' cache = false> <drawstep func = 'roundedsq' @@ -429,15 +433,17 @@ <def var = 'Padding.Right' value = '16' /> <def var = 'Padding.Top' value = '16' /> - <widget name = 'Inset' - pos = '23, 94' - size = '666, 666' + <widget name = 'OptionsLabel' + size = '110, 16' /> <widget name = 'Button' size = '120, 25' /> <widget name = 'Slider' - size = '666, 666' + size = '256, 32' + /> + <widget name = 'PopUp' + size = '-1, 19' /> <widget name = 'ListWidget' padding = '7, 5, 5, 5' @@ -532,22 +538,190 @@ </dialog> <dialog name = 'GlobalOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'> - <layout type = 'vertical' padding = '16, 16, 16, 16'> + <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> <widget name = 'grModePopup' - width = '512' - height = '64' + height = 'Globals.PopUp.Height' /> <widget name = 'grRenderPopup' - width = '512' - height = '64' + height = 'Globals.PopUp.Height' /> <widget name = 'grAspectCheckbox' - width = '256' - height = '32' + height = 'Globals.Line.Height' /> <widget name = 'grFullscreenCheckbox' - width = '256' - height = '32' + height = 'Globals.Line.Height' + /> + </layout> + </dialog> + + <dialog name = 'GlobalOptions_Audio' overlays = 'Dialog.GlobalOptions.TabWidget'> + <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> + <widget name = 'auMidiPopup' + height = 'Globals.Line.Height' + /> + <widget name = 'auSampleRatePopup' + height = 'Globals.Line.Height' + /> + <layout type = 'horizontal' padding = '0, 0, 0, 0'> + <widget name = 'subToggleDesc' + width = 'Globals.OptionsLabel.Width' + height = 'Globals.OptionsLabel.Height' + /> + <widget name = 'subToggleButton' + width = '150' + height = 'Globals.Slider.Height' + /> + </layout> + <layout type = 'horizontal' padding = '0, 0, 0, 0'> + <widget name = 'subSubtitleSpeedDesc' + width = 'Globals.OptionsLabel.Width' + height = 'Globals.OptionsLabel.Height' + /> + <widget name = 'subSubtitleSpeedSlider' + width = 'Globals.Slider.Width' + height = 'Globals.Slider.Height' + /> + <widget name = 'subSubtitleSpeedLabel' + width = '32' + height = 'Globals.Line.Height' + /> + </layout> + </layout> + </dialog> + + <dialog name = 'GlobalOptions_Volume' overlays = 'Dialog.GlobalOptions.TabWidget'> + <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> + <layout type = 'horizontal' padding = '0, 0, 0, 0'> + <widget name = 'vcMusicText' + width = 'Globals.OptionsLabel.Width' + height = 'Globals.OptionsLabel.Height' + /> + <widget name = 'vcMusicSlider' + width = 'Globals.Slider.Width' + height = 'Globals.Slider.Height' + /> + <widget name = 'vcMusicLabel' + width = '32' + height = 'Globals.Line.Height' + /> + </layout> + <layout type = 'horizontal' padding = '0, 0, 0, 0'> + <widget name = 'vcSfxText' + width = 'Globals.OptionsLabel.Width' + height = 'Globals.OptionsLabel.Height' + /> + <widget name = 'vcSfxSlider' + width = 'Globals.Slider.Width' + height = 'Globals.Slider.Height' + /> + <widget name = 'vcSfxLabel' + width = '32' + height = 'Globals.Line.Height' + /> + </layout> + <layout type = 'horizontal' padding = '0, 0, 0, 0'> + <widget name = 'vcSpeechText' + width = 'Globals.OptionsLabel.Width' + height = 'Globals.OptionsLabel.Height' + /> + <widget name = 'vcSpeechSlider' + width = 'Globals.Slider.Width' + height = 'Globals.Slider.Height' + /> + <widget name = 'vcSpeechLabel' + width = '32' + height = 'Globals.Line.Height' + /> + </layout> + </layout> + </dialog> + + <dialog name = 'GlobalOptions_MIDI' overlays = 'Dialog.GlobalOptions.TabWidget'> + <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> + <layout type = 'horizontal' padding = '0, 0, 0, 0'> + <widget name = 'mcFontButton' + width = 'Globals.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'mcFontClearButton' + height = 'Globals.Line.Height' + width = 'Globals.Line.Height' + /> + <widget name = 'mcFontPath' + height = 'Globals.Line.Height' + /> + </layout> + <widget name = 'mcMixedCheckbox' + height = 'Globals.Line.Height' + /> + <widget name = 'mcMt32Checkbox' + height = 'Globals.Line.Height' + /> + <widget name = 'mcGSCheckbox' + height = 'Globals.Line.Height' + /> + <layout type = 'horizontal' padding = '0, 0, 0, 0'> + <widget name = 'mcMidiGainText' + width = 'Globals.OptionsLabel.Width' + height = 'Globals.OptionsLabel.Height' + /> + <widget name = 'mcMidiGainSlider' + width = 'Globals.Slider.Width' + height = 'Globals.Slider.Height' + /> + <widget name = 'mcMidiGainLabel' + width = '32' + height = 'Globals.Line.Height' + /> + </layout> + </layout> + </dialog> + + <dialog name = 'GlobalOptions_Paths' overlays = 'Dialog.GlobalOptions.TabWidget'> + <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> + <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'> + <widget name = 'SaveButton' + width = 'Globals.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'SavePath' + height = 'Globals.Line.Height' + /> + </layout> + <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'> + <widget name = 'ThemeButton' + width = 'Globals.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'ThemePath' + height = 'Globals.Line.Height' + /> + </layout> + <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'> + <widget name = 'ExtraButton' + width = 'Globals.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'ExtraPath' + height = 'Globals.Line.Height' + /> + </layout> + </layout> + </dialog> + + <dialog name = 'GlobalOptions_Misc' overlays = 'Dialog.GlobalOptions.TabWidget'> + <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> + <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'> + <widget name = 'ThemeButton' + width = 'Globals.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'CurTheme' + height = 'Globals.Line.Height' + /> + </layout> + <widget name = 'AutosavePeriod' + height = 'Globals.PopUp.Height' /> </layout> </dialog> |