aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/VectorRenderer.cpp2
-rw-r--r--gui/ThemeDefaultXML.cpp599
-rw-r--r--gui/ThemeRenderer.cpp26
-rw-r--r--gui/ThemeRenderer.h6
-rw-r--r--gui/theme-config.cpp4
5 files changed, 476 insertions, 161 deletions
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp
index 5ac976c251..3bd3b86cf8 100644
--- a/graphics/VectorRenderer.cpp
+++ b/graphics/VectorRenderer.cpp
@@ -517,7 +517,7 @@ template<typename PixelType, typename PixelFormat>
void VectorRendererSpec<PixelType, PixelFormat>::
drawTab(int x, int y, int r, int w, int h) {
if (x + w > Base::_activeSurface->w || y + h > Base::_activeSurface->h ||
- w <= 0 || h <= 0 || x < 0 || y < 0 || (r << 1) > w || (r << 1) > h)
+ w <= 0 || h <= 0 || x < 0 || y < 0 || r > w || r > h)
return;
switch (Base::_fillMode) {
diff --git a/gui/ThemeDefaultXML.cpp b/gui/ThemeDefaultXML.cpp
index 630445a6fd..298f26e782 100644
--- a/gui/ThemeDefaultXML.cpp
+++ b/gui/ThemeDefaultXML.cpp
@@ -36,158 +36,455 @@ bool ThemeRenderer::loadDefaultXML() {
* You may use single quotes (') instead of scaped double quotes.
* Remember to indent properly the XML so it's easier to read and
* to maintain!
+ * Also remember to scape the end of each line. :p
*/
-"<render_info>"
- "<palette>"
- "<color name = 'red' rgb = '255, 0, 0' />"
- "<color name = 'green' rgb = '0, 255, 0' />"
- "<color name = 'blue' rgb = '0, 255, 255' />"
- "</palette>"
-
- "<fonts>"
- "<font id = 'text_default' type = 'default' color = '0, 0, 0' />"
- "<font id = 'text_hover' type = 'default' color = '255, 255, 255' />"
- "<font id = 'text_disabled' type = 'default' color = '128, 128, 128' />"
- "<font id = 'text_inverted' type = 'default' color = '173, 40, 8' />"
- "</fonts>"
-
- "<defaults fill = 'gradient' fg_color = '255, 255, 255' />"
-
- "<drawdata id = 'text_selection' cache = false>"
- "<drawstep func = 'roundedsq' radius = 4 fill = 'foreground' fg_color = '255, 255, 255' />"
- "</drawdata>"
-
- "<drawdata id = 'mainmenu_bg' cache = false>"
- "<drawstep func = 'fill' fill = 'gradient' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' />"
- "</drawdata>"
-
- "<drawdata id = 'separator' cache = false>"
- "<drawstep func = 'square' fill = 'foreground' height = '3' ypos = 'center' fg_color = '0, 0, 0' />"
- "</drawdata>"
-
- "<drawdata id = 'scrollbar_base' cache = false>"
- "<drawstep func = 'roundedsq' stroke = 1 radius = 6 fill = 'background' fg_color = '120, 120, 120' bg_color = '255, 243, 206' />"
- "</drawdata>"
-
- "<drawdata id = 'scrollbar_handle_hover' cache = false>"
- "<drawstep func = 'roundedsq' stroke = 1 radius = 6 fill = 'gradient' fg_color = '255, 255, 255' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' />"
- "</drawdata>"
-
- "<drawdata id = 'scrollbar_handle_idle' cache = false>"
- "<drawstep func = 'roundedsq' stroke = 1 radius = 6 fill = 'background' fg_color = '120, 120, 120' bg_color = '255, 255, 255' />"
- "</drawdata>"
-
- "<drawdata id = 'scrollbar_button_idle' cache = false>"
- "<drawstep func = 'roundedsq' radius = '4' fill = 'none' fg_color = '120, 120, 120' 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 = '2' fill = 'gradient' gradient_end = '255, 231, 140' gradient_start = '255, 243, 206' shadow = 3 />"
- "</drawdata>"
-
- "<drawdata id = 'tab_inactive' cache = false>"
- "<text font = 'text_disabled' vertical_align = 'center' horizontal_align = 'center' />"
- "<drawstep func = 'tab' radius = '4' stroke = '0' fill = 'foreground' fg_color = '206, 121, 99' shadow = 3 />"
- "</drawdata>"
-
- "<drawdata id = 'widget_slider' cache = false>"
- "<drawstep func = 'roundedsq' stroke = 1 radius = 8 fill = 'none' fg_color = '0, 0, 0' />"
- "</drawdata>"
-
- "<drawdata id = 'slider_full' cache = false>"
- "<drawstep func = 'roundedsq' stroke = 1 radius = 8 fill = 'gradient' fg_color = '0, 0, 0' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' />"
- "</drawdata>"
-
- "<drawdata id = 'popup_idle' cache = false>"
- "<drawstep func = 'square' stroke = 0 fg_color = '0, 0, 0' fill = 'gradient' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' shadow = 3 />"
- "<drawstep func = 'triangle' fg_color = '0, 0, 0' 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 = 'square' stroke = 0 fg_color = '0, 0, 0' fill = 'gradient' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' shadow = 0 />"
- "<drawstep func = 'triangle' fg_color = '0, 0, 0' 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 = 2 fg_color = '255, 255, 255' fill = 'gradient' gradient_start = '255, 231, 140' gradient_end = '255, 243, 206' shadow = 3 />"
- "</drawdata>"
-
- "<drawdata id = 'button_idle' cache = false>"
- "<text font = 'text_default' vertical_align = 'center' horizontal_align = 'center' />"
- "<drawstep func = 'roundedsq' radius = '8' stroke = 0 fill = 'foreground' shadow = 3 />"
- "</drawdata>"
-
- "<drawdata id = 'button_hover' cache = false>"
- "<text font = 'text_hover' vertical_align = 'center' horizontal_align = 'center' />"
- "<drawstep func = 'roundedsq' radius = '8' stroke = '1' fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' shadow = 0 />"
- "</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 = 'square' fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' shadow = 0 />"
- "</drawdata>"
-
- "<drawdata id = 'checkbox_enabled' cache = false>"
- "<text font = 'text_default' vertical_align = 'top' horizontal_align = 'left' />"
- "<drawstep func = 'square' fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' shadow = 0 />"
- "<drawstep func = 'circle' radius = 'auto' fill = 'foreground' />"
- "</drawdata>"
-
- "<drawdata id = 'widget_default' cache = false>"
- "<drawstep func = 'roundedsq' gradient_factor = 6 radius = '4' fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' shadow = 0 />"
- "</drawdata>"
-"</render_info>"
-
-"<layout_info>"
- "<globals>"
- "<def var = 'Widget.Size' value = '30' />"
- "<def var = 'Line.Height' value = '16' />"
- "<def var = 'Font.Height' 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'>"
- "<widget name = 'Version' pos = 'center, 21' size = '247, Globals.Line.Height' />"
- "<widget name = 'Logo' pos = 'center, 5' size = '283, 80' />"
- "<widget name = 'GameList' pos = 'Globals.Inset.X, Globals.Inset.Y' size = 'Globals.Inset.Width, Globals.Inset.Height' />"
-
- "<widget name = 'StartButton' size = 'Globals.Button.Width, Globals.Button.Height' />"
- "<widget name = 'AddGameButton' size = 'Globals.Button.Width, Globals.Button.Height' />"
- "<widget name = 'EditGameButton' size = 'Globals.Button.Width, Globals.Button.Height' />"
- "<widget name = 'RemoveGameButton' size = 'Globals.Button.Width, Globals.Button.Height' />"
- "<widget name = 'OptionsButton' size = 'Globals.Button.Width, Globals.Button.Height' />"
- "<widget name = 'AboutButton' size = 'Globals.Button.Width, Globals.Button.Height' />"
- "<widget name = 'QuittButton' size = 'Globals.Button.Width, Globals.Button.Height' />"
- "</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' \
+ /> \
+ </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' /> \
+ \
+ <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 = '12' \
+ stroke = '0' \
+ fill = 'foreground' \
+ fg_color = '232, 180, 81' \
+ shadow = 3 \
+ /> \
+ </drawdata> \
+ \
+ <drawdata id = 'widget_slider' cache = false> \
+ <drawstep func = 'roundedsq' \
+ stroke = 1 \
+ radius = 8 \
+ fill = 'none' \
+ fg_color = '0, 0, 0' \
+ /> \
+ </drawdata> \
+ \
+ <drawdata id = 'slider_full' cache = false> \
+ <drawstep func = 'roundedsq' \
+ stroke = 1 \
+ radius = 8 \
+ fill = 'gradient' \
+ fg_color = '0, 0, 0' \
+ gradient_start = '214, 113, 8' \
+ gradient_end = '240, 200, 25' \
+ /> \
+ </drawdata> \
+ \
+ <drawdata id = 'popup_idle' cache = false> \
+ <drawstep func = 'square' \
+ stroke = 0 \
+ fg_color = '0, 0, 0' \
+ fill = 'gradient' \
+ gradient_start = '214, 113, 8' \
+ gradient_end = '240, 200, 25' \
+ shadow = 3 \
+ /> \
+ <drawstep func = 'triangle' \
+ fg_color = '0, 0, 0' \
+ 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 = 'square' \
+ stroke = 0 \
+ fg_color = 'black' \
+ fill = 'gradient' \
+ gradient_start = '214, 113, 8' \
+ gradient_end = '240, 200, 25' \
+ shadow = 0 \
+ /> \
+ <drawstep func = 'triangle' \
+ fg_color = '0, 0, 0' \
+ 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 = 2 \
+ fg_color = 'blandyellow' \
+ gradient_start = 'brightred' \
+ gradient_end = 'darkred' \
+ /> \
+ </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 = 'blandyellow' \
+ gradient_start = 'xtrabrightred' \
+ gradient_end = 'darkred' \
+ /> \
+ </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 = 8 \
+ fg_color = 'black' \
+ shadow = 0 \
+ /> \
+ </drawdata> \
+ \
+ <drawdata id = 'checkbox_selected' cache = false> \
+ <text font = 'text_default' \
+ vertical_align = 'top' \
+ horizontal_align = 'left' \
+ /> \
+ <drawstep func = 'square' \
+ fill = 'gradient' \
+ gradient_start = '206, 121, 99' \
+ gradient_end = '173, 40, 8' \
+ shadow = 0 \
+ /> \
+ <drawstep func = 'circle' \
+ radius = '4' \
+ fill = 'foreground' \
+ /> \
+ </drawdata> \
+ \
+ <drawdata id = 'checkbox_default' cache = false> \
+ <text font = 'text_default' \
+ vertical_align = 'top' \
+ horizontal_align = 'left' \
+ /> \
+ <drawstep func = 'square' \
+ fill = 'gradient' \
+ gradient_start = '206, 121, 99' \
+ gradient_end = '173, 40, 8' \
+ shadow = 0 \
+ /> \
+ </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 = '30' /> \
+ <def var = 'Line.Height' value = '16' /> \
+ <def var = 'Font.Height' 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'> \
+ <widget name = 'Version' \
+ pos = 'center, 21' \
+ size = '247, Globals.Line.Height' \
+ /> \
+ <widget name = 'Logo' \
+ pos = 'center, 5' \
+ size = '283, 80' \
+ /> \
+ <widget name = 'GameList' \
+ pos = 'Globals.Inset.X, Globals.Inset.Y' \
+ size = 'Globals.Inset.Width, Globals.Inset.Height' \
+ /> \
+ \
+ <widget name = 'StartButton' \
+ size = 'Globals.Button.Width, Globals.Button.Height' \
+ /> \
+ <widget name = 'AddGameButton' \
+ size = 'Globals.Button.Width, Globals.Button.Height' \
+ /> \
+ <widget name = 'EditGameButton' \
+ size = 'Globals.Button.Width, Globals.Button.Height' \
+ /> \
+ <widget name = 'RemoveGameButton' \
+ size = 'Globals.Button.Width, Globals.Button.Height' \
+ /> \
+ <widget name = 'OptionsButton' \
+ size = 'Globals.Button.Width, Globals.Button.Height' \
+ /> \
+ <widget name = 'AboutButton' \
+ size = 'Globals.Button.Width, Globals.Button.Height' \
+ /> \
+ <widget name = 'QuittButton' \
+ size = 'Globals.Button.Width, Globals.Button.Height' \
+ /> \
+ </dialog> \
+</layout_info>";
if (!parser()->loadBuffer((const byte*)defaultXML, strlen(defaultXML), false))
return false;
diff --git a/gui/ThemeRenderer.cpp b/gui/ThemeRenderer.cpp
index 48c5eaf7f3..a81f46cf8e 100644
--- a/gui/ThemeRenderer.cpp
+++ b/gui/ThemeRenderer.cpp
@@ -58,11 +58,13 @@ const ThemeRenderer::DrawDataInfo ThemeRenderer::kDrawDataDefaults[] = {
{kDDSliderFull, "slider_full", false, kDDNone},
- {kDDCheckboxEnabled, "checkbox_enabled", false, kDDCheckboxDisabled},
+ {kDDCheckboxDefault, "checkbox_default", true, kDDNone},
{kDDCheckboxDisabled, "checkbox_disabled", true, kDDNone},
+ {kDDCheckboxSelected, "checkbox_selected", false, kDDCheckboxDefault},
{kDDTabActive, "tab_active", false, kDDTabInactive},
{kDDTabInactive, "tab_inactive", true, kDDNone},
+ {kDDTabBackground, "tab_background", true, kDDNone},
{kDDScrollbarBase, "scrollbar_base", true, kDDNone},
@@ -83,7 +85,9 @@ const ThemeRenderer::TextDataInfo ThemeRenderer::kTextDataDefaults[] = {
{kTextDataDefault, "text_default"},
{kTextDataHover, "text_hover"},
{kTextDataDisabled, "text_disabled"},
- {kTextDataInverted, "text_inverted"}
+ {kTextDataInverted, "text_inverted"},
+ {kTextDataButton, "text_button"},
+ {kTextDataButtonHover, "text_button_hover"}
};
@@ -446,7 +450,15 @@ void ThemeRenderer::drawCheckbox(const Common::Rect &r, const Common::String &st
return;
Common::Rect r2 = r;
- DrawData dd = checked ? kDDCheckboxEnabled : kDDCheckboxDisabled;
+ DrawData dd = kDDCheckboxDefault;
+
+ if (checked)
+ dd = kDDCheckboxSelected;
+
+ if (state == kStateDisabled)
+ dd = kDDCheckboxDisabled;
+
+ TextData td = (state == kStateHighlight) ? kTextDataHover : getTextData(dd);
const int checkBoxSize = MIN((int)r.height(), getFontHeight());
r2.bottom = r2.top + checkBoxSize;
@@ -457,7 +469,7 @@ void ThemeRenderer::drawCheckbox(const Common::Rect &r, const Common::String &st
r2.left = r2.right + checkBoxSize;
r2.right = r.right;
- queueDDText(getTextData(dd), r2, str, false, false, _widgets[dd]->_textAlignH, _widgets[dd]->_textAlignV);
+ queueDDText(td, r2, str, false, false, _widgets[kDDCheckboxDefault]->_textAlignH, _widgets[dd]->_textAlignV);
}
void ThemeRenderer::drawSlider(const Common::Rect &r, int width, WidgetStateInfo state) {
@@ -564,12 +576,14 @@ void ThemeRenderer::drawTab(const Common::Rect &r, int tabHeight, int tabWidth,
if (!ready())
return;
- const int tabOffset = 1;
+ const int tabOffset = 3;
+
+ queueDD(kDDTabBackground, Common::Rect(r.left, r.top, r.right, r.top + tabHeight));
for (int i = 0; i < (int)tabs.size(); ++i) {
if (i == active)
continue;
-
+
Common::Rect tabRect(r.left + i * (tabWidth + tabOffset), r.top, r.left + i * (tabWidth + tabOffset) + tabWidth, r.top + tabHeight);
queueDD(kDDTabInactive, tabRect);
queueDDText(getTextData(kDDTabInactive), tabRect, tabs[i], false, false, _widgets[kDDTabInactive]->_textAlignH, _widgets[kDDTabInactive]->_textAlignV);
diff --git a/gui/ThemeRenderer.h b/gui/ThemeRenderer.h
index 2b15d7dfa8..2a0f059d41 100644
--- a/gui/ThemeRenderer.h
+++ b/gui/ThemeRenderer.h
@@ -119,11 +119,13 @@ protected:
kDDSliderFull,
- kDDCheckboxEnabled,
+ kDDCheckboxDefault,
kDDCheckboxDisabled,
+ kDDCheckboxSelected,
kDDTabActive,
kDDTabInactive,
+ kDDTabBackground,
kDDScrollbarBase,
kDDScrollbarButtonIdle,
@@ -168,6 +170,8 @@ protected:
kTextDataHover,
kTextDataDisabled,
kTextDataInverted,
+ kTextDataButton,
+ kTextDataButtonHover,
kTextDataMAX
};
diff --git a/gui/theme-config.cpp b/gui/theme-config.cpp
index 47f60d3d7b..1f52567e3e 100644
--- a/gui/theme-config.cpp
+++ b/gui/theme-config.cpp
@@ -138,7 +138,7 @@ const char *Theme::_defaultConfigINI =
"PopUpWidget.leftPadding=4\n"
"PopUpWidget.rightPadding=0\n"
"TabWidget.tabWidth=70\n"
-"TabWidget.tabHeight=21\n"
+"TabWidget.tabHeight=22\n"
"TabWidget.titleVPad=2\n"
"\n"
"###### chooser\n"
@@ -183,7 +183,7 @@ const char *Theme::_defaultConfigINI =
"globaloptions=insetX insetY insetW insetH\n"
"set_parent=globaloptions\n"
"vBorder=5\n"
-"globaloptions_tabwidget=0 vBorder parent.w (parent.h - buttonHeight - 8 - 2 * vBorder)\n"
+"globaloptions_tabwidget=0 0 parent.w (parent.h - buttonHeight - 8 - 2 * vBorder)\n"
"\n"
"# graphics tab\n"
"opYoffset=vBorder\n"