/
drop_down_list.cfg
85 lines (66 loc) · 1.96 KB
/
drop_down_list.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
#textdomain wesnoth-lib
###
### Definition of the window select the way to access the addon server.
###
[window]
id = "drop_down_list"
description="Not Empty"
[resolution]
maximum_width = 9999
maximum_height = 9999
#define FORMULA_WINDOW_HEIGHT
min(if(window_height > 0, window_height, screen_width), max(button_y, screen_height - button_h - button_y)) #enddef
definition = "default"
## For some unknown reason qwe need a +5 here othwerwise the dialog won't really have the same size as the button.
width="(max(button_w + 5, if(window_width > 0, window_width, screen_width)))"
height="({FORMULA_WINDOW_HEIGHT})"
## Show the droplist below or above the button, whereever we have enough space. Below is preffered.
x="(min(button_x, screen_width - window_width))"
y="(if(screen_height - button_h - button_y > {FORMULA_WINDOW_HEIGHT}, button_h + button_y, button_y - {FORMULA_WINDOW_HEIGHT}))"
automatic_placement = false
#undef FORMULA_WINDOW_HEIGHT
[tooltip]
id = "tooltip_large"
[/tooltip]
[helptip]
id = "tooltip_large"
[/helptip]
[grid]
[row]
[column]
horizontal_grow = "true"
vertical_grow = "true"
border = "all"
border_size = 0
[listbox]
id = "list"
definition = "default"
[list_definition]
[row]
[column]
grow_factor = 1
horizontal_grow = "true"
[toggle_panel]
definition="default"
[grid]
[row]
[column]
border = "all"
border_size = 5
horizontal_alignment = "left"
[label]
id="label"
[/label]
[/column]
[/row]
[/grid]
[/toggle_panel]
[/column]
[/row]
[/list_definition]
[/listbox]
[/column]
[/row]
[/grid]
[/resolution]
[/window]