Give the tips of day text a fixed width.
The exact maximum might needs so tweaking.
This commit is contained in:
parent
8b6793a2d5
commit
301aa33daa
2 changed files with 14 additions and 12 deletions
|
@ -4,8 +4,9 @@
|
|||
###
|
||||
### Defines the following labels
|
||||
### - alignment, the one for general usage, which lets pango handle the alignment
|
||||
### - title_screen_tip, the one for the tips in the title screen, with a maximum width
|
||||
|
||||
#define _GUI_RESOLUTION RESOLUTION FONT_SIZE FONT_STYLE FONT_COLOUR_ENABLED FONT_COLOUR_DISABLED Y_POSITION
|
||||
#define _GUI_RESOLUTION RESOLUTION FONT_SIZE FONT_STYLE FONT_COLOUR_ENABLED FONT_COLOUR_DISABLED MAX_WIDTH
|
||||
[resolution]
|
||||
|
||||
{RESOLUTION}
|
||||
|
@ -16,7 +17,7 @@
|
|||
default_width = 0
|
||||
default_height = 0
|
||||
|
||||
max_width = 0
|
||||
max_width = {MAX_WIDTH}
|
||||
max_height = 0
|
||||
|
||||
text_font_size = {FONT_SIZE}
|
||||
|
@ -69,7 +70,7 @@
|
|||
[/resolution]
|
||||
#enddef
|
||||
|
||||
#define _GUI_DEFINITION ID DESCRIPTION FONT_SIZE FONT_STYLE FONT_COLOUR Y_POSITION
|
||||
#define _GUI_DEFINITION ID DESCRIPTION FONT_SIZE FONT_STYLE FONT_COLOUR MAX_WIDTH
|
||||
[label_definition]
|
||||
id = {ID}
|
||||
description = {DESCRIPTION}
|
||||
|
@ -80,7 +81,7 @@
|
|||
({FONT_STYLE})
|
||||
({GUI__FONT_COLOUR_ENABLED__{FONT_COLOUR}})
|
||||
({GUI__FONT_COLOUR_DISABLED__{FONT_COLOUR}})
|
||||
({Y_POSITION})
|
||||
({MAX_WIDTH})
|
||||
}
|
||||
|
||||
|
||||
|
@ -90,18 +91,19 @@
|
|||
({FONT_STYLE})
|
||||
({GUI__FONT_COLOUR_ENABLED__{FONT_COLOUR}})
|
||||
({GUI__FONT_COLOUR_DISABLED__{FONT_COLOUR}})
|
||||
({Y_POSITION})
|
||||
({MAX_WIDTH})
|
||||
}
|
||||
|
||||
[/label_definition]
|
||||
#enddef
|
||||
|
||||
# Enable the other types when needed.
|
||||
{_GUI_DEFINITION "alignment" "default label" DEFAULT () DEFAULT ({GUI__TEXT_VERTICALLY_CENTRED})}
|
||||
#{_GUI_DEFINITION "scroll_label" "scroll label" DEFAULT () DEFAULT 0}
|
||||
#{_GUI_DEFINITION "title" "label used for titles" TITLE "bold" TITLE ({GUI__TEXT_VERTICALLY_CENTRED})}
|
||||
#{_GUI_DEFINITION "default_small" "default, small font size" SMALL () DEFAULT ({GUI__TEXT_VERTICALLY_CENTRED})}
|
||||
#{_GUI_DEFINITION "default_tiny" "default, small font size" TINY () DEFAULT ({GUI__TEXT_VERTICALLY_CENTRED})}
|
||||
{_GUI_DEFINITION "alignment" "default label" DEFAULT () DEFAULT 0}
|
||||
{_GUI_DEFINITION "title_screen_tip" "Label used for the tips in the title screen" DEFAULT () DEFAULT 720}
|
||||
#{_GUI_DEFINITION "scroll_label" "scroll label" DEFAULT () DEFAULT 0}
|
||||
#{_GUI_DEFINITION "title" "label used for titles" TITLE "bold" TITLE ({GUI__TEXT_VERTICALLY_CENTRED})}
|
||||
#{_GUI_DEFINITION "default_small" "default, small font size" SMALL () DEFAULT ({GUI__TEXT_VERTICALLY_CENTRED})}
|
||||
#{_GUI_DEFINITION "default_tiny" "default, small font size" TINY () DEFAULT ({GUI__TEXT_VERTICALLY_CENTRED})}
|
||||
|
||||
#undef _GUI_DEFINITION
|
||||
#undef _GUI_RESOLUTION
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
|
||||
[label]
|
||||
id = "tip"
|
||||
definition = "alignment"
|
||||
definition = "title_screen_tip"
|
||||
|
||||
wrap = "true"
|
||||
[/label]
|
||||
|
@ -111,7 +111,7 @@
|
|||
|
||||
[label]
|
||||
id = "source"
|
||||
definition = "alignment"
|
||||
definition = "title_screen_tip"
|
||||
|
||||
text_alignment = "right"
|
||||
[/label]
|
||||
|
|
Loading…
Add table
Reference in a new issue