-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
button_title_screen_small.cfg
149 lines (100 loc) · 3.51 KB
/
button_title_screen_small.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#textdomain wesnoth-lib
#define _GUI_BUTTON_FONT_SIZE
{GUI_FONT_SIZE_TINY} #enddef
#define _GUI_BUTTON_TEXT FONT_SIZE FONT_STYLE FONT_COLOR
[text]
x = 30 # 10 px padding left + 20 px image width
y = "(max((height - text_height - 2) / 2, 0))"
w = "(width - 40)" # 10 px padding right
h = "(text_height)"
maximum_width = "(width - 40)" # 10 px padding right
font_size = {FONT_SIZE}
font_style = {FONT_STYLE}
color = {FONT_COLOR}
text = "(text)"
text_markup = "(text_markup)"
text_alignment = "right"
[/text]
#enddef
#define _GUI_BUTTON_ICON IMAGE_FILESTEM IPF
[image]
x = 5
y = "(max(pos, 0) where pos = floor((height - image_height) / 2))"
w = "(min(width, image_original_width))"
h = "(min(height, image_original_height))"
name = {IMAGE_FILESTEM} + ".png{IPF}"
[/image]
#enddef
#define _GUI_RESOLUTION RESOLUTION MIN_WIDTH DEFAULT_WIDTH HEIGHT EXTRA_WIDTH EXTRA_HEIGHT FONT_SIZE ICON IPF ALPHA
[resolution]
{RESOLUTION}
min_width = {MIN_WIDTH}
min_height = {HEIGHT}
default_width = {DEFAULT_WIDTH}
default_height = {HEIGHT}
max_width = 0
max_height = {HEIGHT}
text_extra_width = {EXTRA_WIDTH}
text_extra_height = {EXTRA_HEIGHT}
text_font_size = {FONT_SIZE}
[state_enabled]
[draw]
{GUI__BUTTON_NORMAL_FRAME "buttons/button_normal/background"
({GUI__BORDER_COLOR ALPHA={ALPHA}})
({GUI__BORDER_COLOR_DARK ALPHA={ALPHA}}) ("21, 79, 109, 255") {IPF}}
{_GUI_BUTTON_ICON {ICON} {IPF}}
{_GUI_BUTTON_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_ENABLED__TITLE})}
[/draw]
[/state_enabled]
[state_disabled]
[draw]
{GUI__BUTTON_NORMAL_FRAME "buttons/button_normal/background"
({GUI__FONT_COLOR_DISABLED__DEFAULT ALPHA={ALPHA}})
("89, 89, 89, {ALPHA}")
("60, 60, 60, 255") "~GS(){IPF}"}
{_GUI_BUTTON_ICON {ICON} "~GS(){IPF}"}
{_GUI_BUTTON_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_DISABLED__TITLE})}
[/draw]
[/state_disabled]
[state_pressed]
[draw]
{GUI__BUTTON_NORMAL_FRAME "buttons/button_normal/background-pressed"
({GUI__BORDER_COLOR ALPHA={ALPHA}})
({GUI__BORDER_COLOR_DARK ALPHA={ALPHA}}) ("1, 10, 16, 255") {IPF}}
{_GUI_BUTTON_ICON {ICON}-pressed {IPF}}
{_GUI_BUTTON_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_ENABLED__TITLE})}
[/draw]
[/state_pressed]
[state_focused]
[draw]
{GUI__BUTTON_NORMAL_FRAME "buttons/button_normal/background-active"
({GUI__BORDER_COLOR ALPHA={ALPHA}})
({GUI__BORDER_COLOR_DARK ALPHA={ALPHA}}) ("12, 108, 157, 255") {IPF}}
{_GUI_BUTTON_ICON {ICON}-active {IPF}}
{_GUI_BUTTON_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_ENABLED__TITLE})}
[/draw]
[/state_focused]
[/resolution]
#enddef
[button_definition]
id = "titlescreen_language"
description = "Language button used on the main menu."
{_GUI_RESOLUTION () 40 80 16 43 14 ({_GUI_BUTTON_FONT_SIZE}) icons/action/language_25 () 255}
{_GUI_RESOLUTION ({GUI_BIG_RESOLUTION})
50 80 20 46 16
({GUI_SCALE_RESOLUTION {_GUI_BUTTON_FONT_SIZE}})
icons/action/language_25 () 255}
[/button_definition]
[button_definition]
id = "titlescreen_about"
description = "General information about Battle for Wesnoth."
{_GUI_RESOLUTION () 40 80 16 43 14 ({_GUI_BUTTON_FONT_SIZE}) icons/action/about_25 () 255}
{_GUI_RESOLUTION ({GUI_BIG_RESOLUTION})
50 80 20 46 16
({GUI_SCALE_RESOLUTION {_GUI_BUTTON_FONT_SIZE}})
icons/action/about_25 () 255}
[/button_definition]
#undef _GUI_RESOLUTION
#undef _GUI_BUTTON_ICON
#undef _GUI_BUTTON_TEXT
#undef _GUI_BUTTON_FONT_SIZE