Minor title screen cleanup

This commit is contained in:
Celtic Minstrel 2016-08-25 00:43:07 -04:00
parent c194c41cd2
commit 136f5a864f
2 changed files with 9 additions and 14 deletions

View file

@ -3,16 +3,13 @@
### Definition of the main screen for Wesnoth.
###
#define _GUI_BG_HRATIO
height * 1.0 / image_original_height
#enddef
#define _GUI_BG_WRATIO
width * 1.0 / image_original_width
#enddef
#define _GUI_BG_RATIO
(if({_GUI_BG_HRATIO} < {_GUI_BG_WRATIO}, {_GUI_BG_HRATIO}, {_GUI_BG_WRATIO}))
(
min(bg_hratio, bg_wratio)
where
bg_hratio = height * 1.0 / image_original_height,
bg_wratio = width * 1.0 / image_original_width
)
#enddef
#define _GUI_BG_Y
@ -45,8 +42,8 @@
[image]
w = "(round(image_original_width * {_GUI_BG_RATIO}))"
h = "(round(image_original_height * {_GUI_BG_RATIO}))"
x = "(if({_GUI_BG_X} < 0, 0, {_GUI_BG_X}))"
y = "(if({_GUI_BG_Y} < 0, 0, {_GUI_BG_Y}))"
x = "(max(0, {_GUI_BG_X}))"
y = "(max(0, {_GUI_BG_Y}))"
name = "(title_image)"
[/image]
@ -65,8 +62,6 @@
[/resolution]
[/window_definition]
#undef _GUI_BG_HRATIO
#undef _GUI_BG_WRATIO
#undef _GUI_BG_RATIO
#undef _GUI_BG_Y
#undef _GUI_BG_X

View file

@ -273,7 +273,7 @@ void ttitle_screen::pre_show(twindow& window)
if(tcontrol* control
= find_widget<tcontrol>(&window, "revision_number", false, false)) {
control->set_label(_("Version ") + game_config::revision);
control->set_label(_("Version") + std::string(" ") + game_config::revision);
}
window.canvas()[0].set_variable(
"revision_number",