-
-
Notifications
You must be signed in to change notification settings - Fork 990
/
slider_minimal.cfg
100 lines (76 loc) · 1.87 KB
/
slider_minimal.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
#textdomain wesnoth-lib
###
### Experimental slider variant that does not have a text label since the
### default variant does have one that takes up more space than is strictly
### necessary and I (shadowm) can't deal with all the magic numbers in it.
###
#define _GUI_STATE IMAGE_SUFFIX GROOVE_COLOR
[draw]
#
# Groove
#
[line]
x1 = 0
y1 = "(height / 2)"
x2 = "(width - 1)"
y2 = "(height / 2)"
color = {GROOVE_COLOR}
thickness = 1
[/line]
#
# Slider
#
[image]
x = "(positioner_offset)"
y = "(if (image_height < height, (height - image_height) / 2, 0))"
name = "buttons/sliders/slider{IMAGE_SUFFIX}"
[/image]
[/draw]
#enddef
#define _GUI_RESOLUTION RESOLUTION MIN_WIDTH DEFAULT_WIDTH HEIGHT POSITIONER_LENGTH
[resolution]
{RESOLUTION}
min_width = {MIN_WIDTH}
min_height = {HEIGHT}
default_width = {DEFAULT_WIDTH}
default_height = {HEIGHT}
max_width = 0
max_height = {HEIGHT}
minimum_positioner_length = {POSITIONER_LENGTH}
maximum_positioner_length = {POSITIONER_LENGTH}
#text_font_size = 1 # placeholder
[state_enabled]
{_GUI_STATE
".png"
({GUI__FONT_COLOR_ENABLED__DEFAULT})
}
[/state_enabled]
[state_disabled]
{_GUI_STATE
".png~GS()"
({GUI__FONT_COLOR_DISABLED__DEFAULT})
}
[/state_disabled]
[state_pressed]
{_GUI_STATE
"-pressed.png"
({GUI__FONT_COLOR_ENABLED__DEFAULT})
}
[/state_pressed]
[state_focussed]
{_GUI_STATE
"-active.png"
({GUI__FONT_COLOR_ENABLED__DEFAULT})
}
[/state_focussed]
[/resolution]
#enddef
[slider_definition]
id = "minimal"
description = "A slider without a value label."
# Tiny gui sizes haven't been tested yet so might need some tuning.
{_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 75 125 11 8 }
{_GUI_RESOLUTION () 150 250 22 16 }
[/slider_definition]
#undef _GUI_STATE
#undef _GUI_RESOLUTION