Refactored the label definition and added a tiny-gui version.
This commit is contained in:
parent
af42d9eb9c
commit
1af166edc6
1 changed files with 39 additions and 14 deletions
|
@ -1,14 +1,15 @@
|
|||
###
|
||||
### Definition of a label.
|
||||
###
|
||||
|
||||
|
||||
#define LABEL_DEFINITION ID DESCRIPTION FONT_SIZE FONT_COLOUR FONT_STYLE
|
||||
[label_definition]
|
||||
id = {ID}
|
||||
description = {DESCRIPTION}
|
||||
###
|
||||
### Defines the following labels
|
||||
### - default, the one for general usage.
|
||||
### - title, for titles in dialogs.
|
||||
|
||||
#define _GUI_RESOLUTION RESOLUTION FONT_SIZE FONT_STYLE FONT_COLOUR_ENABLED FONT_COLOUR_DISABLED
|
||||
[resolution]
|
||||
|
||||
{RESOLUTION}
|
||||
|
||||
min_width = 0
|
||||
min_height = 0
|
||||
|
||||
|
@ -29,12 +30,12 @@
|
|||
|
||||
[text]
|
||||
x = 0
|
||||
y = {TEXT_V_CENTRE}
|
||||
y = {GUI__TEXT_VERTICALALLY_CENTRED}
|
||||
w = "(text_width)"
|
||||
h = "(text_height)"
|
||||
font_size = {FONT_SIZE}
|
||||
font_style = {FONT_STYLE}
|
||||
colour = {FONT_COLOUR}
|
||||
colour = {FONT_COLOUR_ENABLED}
|
||||
text = "(text)"
|
||||
[/text]
|
||||
|
||||
|
@ -50,12 +51,12 @@
|
|||
|
||||
[text]
|
||||
x = 0
|
||||
y = {TEXT_V_CENTRE}
|
||||
y = {GUI__TEXT_VERTICALALLY_CENTRED}
|
||||
w = "(text_width)"
|
||||
h = "(text_height)"
|
||||
font_size = {FONT_SIZE}
|
||||
font_style = {FONT_STYLE}
|
||||
colour = {FONT_COLOUR}
|
||||
colour = {FONT_COLOUR_DISABLED}
|
||||
text = "(text)"
|
||||
[/text]
|
||||
|
||||
|
@ -64,11 +65,35 @@
|
|||
[/state_disabled]
|
||||
|
||||
[/resolution]
|
||||
#enddef
|
||||
|
||||
#define _GUI_DEFINITION ID DESCRIPTION FONT_SIZE FONT_STYLE FONT_COLOUR
|
||||
[label_definition]
|
||||
id = {ID}
|
||||
description = {DESCRIPTION}
|
||||
|
||||
{_GUI_RESOLUTION
|
||||
({GUI_TINY__RESOLUTION})
|
||||
({GUI_TINY__FONT_SIZE__{FONT_SIZE}})
|
||||
({FONT_STYLE})
|
||||
({GUI__FONT_COLOUR_ENABLED__{FONT_COLOUR}})
|
||||
({GUI__FONT_COLOUR_DISABLED__{FONT_COLOUR}})
|
||||
}
|
||||
|
||||
|
||||
{_GUI_RESOLUTION
|
||||
({GUI_NORMAL__RESOLUTION})
|
||||
({GUI_NORMAL__FONT_SIZE__{FONT_SIZE}})
|
||||
({FONT_STYLE})
|
||||
({GUI__FONT_COLOUR_ENABLED__{FONT_COLOUR}})
|
||||
({GUI__FONT_COLOUR_DISABLED__{FONT_COLOUR}})
|
||||
}
|
||||
|
||||
[/label_definition]
|
||||
#enddef
|
||||
|
||||
{LABEL_DEFINITION "default" "default label" 16 {FONT_COLOUR_ENABLED} "normal"}
|
||||
{LABEL_DEFINITION "title" "label used for titles" {FONT_SIZE_NORMAL__TITLE} {FONT_COLOUR_TITLE} "bold"}
|
||||
{_GUI_DEFINITION "default" "default label" DEFAULT () DEFAULT }
|
||||
{_GUI_DEFINITION "title" "label used for titles" TITLE "bold" TITLE }
|
||||
|
||||
#undef LABEL_DEFINITION
|
||||
#undef _GUI_DEFINITION
|
||||
#undef _GUI_RESOLUTION
|
||||
|
|
Loading…
Add table
Reference in a new issue