diff --git a/data/gui/themes/celes/dialogs/title_screen.cfg b/data/gui/themes/celes/dialogs/title_screen.cfg index 159337fee55..56086592408 100644 --- a/data/gui/themes/celes/dialogs/title_screen.cfg +++ b/data/gui/themes/celes/dialogs/title_screen.cfg @@ -49,6 +49,17 @@ where resize_mode = "scale" [/image] + [text] + x = "5" + y = "(height - text_height - 5)" + w = "(text_width)" + h = "(text_height)" + text = "(revision_number)" + color = "255, 255, 255, 255" + outline = true + font_size = {GUI_FONT_SIZE_SMALL} + [/text] + [/draw] [/background] @@ -71,15 +82,13 @@ where #define _GUI_TIP_SECTION [panel] id = "tip_panel" - definition = "title" + definition = "title_padded" [grid] [row] [column] - border = "all" - border_size = "15" horizontal_grow = true [multi_page] @@ -138,32 +147,17 @@ where [row] [column] - horizontal_grow = true - border = "bottom,left,right" - border_size = "15" + border = "top" + border_size = 15 + horizontal_alignment = "left" [grid] [row] - [column] - border = "all" - border_size = 5 - grow_factor = 1 - horizontal_alignment = "left" - - [button] - id = "close" - definition = "titlescreen_button_noicon" - label = _ "Hide" - tooltip = _ "Hide tip of the day" - [/button] - - [/column] [column] border = "all" border_size = 5 - grow_factor = 0 [button] id = "previous_tip" @@ -177,7 +171,6 @@ where [column] border = "all" border_size = 5 - grow_factor = 0 [button] id = "next_tip" @@ -202,6 +195,64 @@ where [/panel] #enddef +#define _GUI_ABOUT_SECTION + [panel] + definition = "title_padded" + + [grid] + + [row] + + [column] + border = "all" + border_size = 5 + grow_factor = 1 + horizontal_alignment = "left" + + [button] + id = "toggle_tip_panel" + definition = "titlescreen_button_noicon" + label = _ "Tip of the Day" + tooltip = _ "Show tip of the day" + [/button] + + [/column] + + [column] + border = "all" + border_size = 5 + + [button] + id = "about" + definition = "titlescreen_about" + linked_group = "about_and_language" + label = _ "About" + tooltip = _ "General information about Battle for Wesnoth" + [/button] + + [/column] + + [column] + border = "all" + border_size = 5 + + [button] + id = "language" + definition = "titlescreen_language" + linked_group = "about_and_language" + label = _ "Language" + tooltip = _ "Change the language" + [/button] + + [/column] + + [/row] + + [/grid] + + [/panel] +#enddef + #define _GUI_BUTTON ID CAPTION TOOLTIP #arg DEF "title_small" #endarg @@ -431,60 +482,11 @@ where [row] [column] - border = "all" - border_size = 10 - horizontal_alignment = "right" - - [grid] - - [row] - - [column] - border = "all" - border_size = 5 - - [label] - id = "revision_number" - definition = "default_outline" - [/label] - - [/column] - - [column] - border = "all" - border_size = 5 - - [button] - id = "about" - definition = "titlescreen_about" - linked_group = "about_and_language" - label = _ "About" - tooltip = _ "General information about Battle for Wesnoth" - [/button] - - [/column] - - [column] - border = "all" - border_size = 5 - - [button] - id = "language" - definition = "titlescreen_language" - linked_group = "about_and_language" - label = _ "Language" - tooltip = _ "Change the language" - [/button] - - [/column] - - # Align with buttons in tips panel - {GUI_FILLER WIDTH=5} - - [/row] - - [/grid] + border = "top" + border_size = 15 + horizontal_grow = true + {_GUI_ABOUT_SECTION} [/column] [/row] @@ -502,6 +504,7 @@ where [/window] #undef _GUI_TIP_SECTION +#undef _GUI_ABOUT_SECTION #undef _GUI_MENU_SECTION #undef _GUI_BUTTON_GRID #undef _GUI_BUTTON diff --git a/data/gui/themes/celes/widgets/panel_title.cfg b/data/gui/themes/celes/widgets/panel_title.cfg index d87256d23c3..acc3597615b 100644 --- a/data/gui/themes/celes/widgets/panel_title.cfg +++ b/data/gui/themes/celes/widgets/panel_title.cfg @@ -3,27 +3,20 @@ ### Default definition of a panel. ### -[panel_definition] - - id = "title" - description = "Panel used in titlescreen" - +#define _GUI_RESOLUTION _BORDER [resolution] + left_border = {_BORDER} + right_border = {_BORDER} + top_border = {_BORDER} + bottom_border = {_BORDER} + [background] [draw] {DEFAULT_BLUR} - #[image] - # x = 0 - # y = 0 - # w = "(width)" - # h = "(height)" - # name = "panels/background-title.png" - #[/image] - [rectangle] x = 0 y = 0 @@ -45,5 +38,24 @@ [/foreground] [/resolution] +#enddef + +[panel_definition] + + id = "title" + description = "Panel used in titlescreen" + + {_GUI_RESOLUTION 0} [/panel_definition] + +[panel_definition] + + id = "title_padded" + description = "Panel used in titlescreen" + + {_GUI_RESOLUTION 15} + +[/panel_definition] + +#undef _GUI_RESOLUTION diff --git a/src/gui/dialogs/title_screen.cpp b/src/gui/dialogs/title_screen.cpp index d5e3209114c..35008efecec 100644 --- a/src/gui/dialogs/title_screen.cpp +++ b/src/gui/dialogs/title_screen.cpp @@ -244,16 +244,22 @@ void title_screen::init_callbacks() // Tip panel visiblity and close button panel& tip_panel = find_widget("tip_panel"); - if (!prefs::get().show_tips()) { - tip_panel.set_visible(false); - } else { - auto close = find_widget