forked from gsnerf/Baud-Bag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BaudBagOptions.xml
300 lines (267 loc) · 11 KB
/
BaudBagOptions.xml
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="BaudBagOptions.lua" />
<!-- templates for visual elements -->
<Frame name="BaudBagGroupHeaderTemplate" virtual="true">
<Size y="18" />
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentTitle" parentKey="Label" inherits="GameFontNormal" justifyH="LEFT">
<Anchors>
<Anchor point="TOPLEFT" x="10" />
<Anchor point="BOTTOM" />
</Anchors>
</FontString>
<!--Texture name="$parentLeft" parentKey="Left" file="Interface\Tooltips\UI-Tooltip-Border">
<Size y="8" />
<Anchors>
<Anchor point="LEFT" x="10" y="0" />
<Anchor point="RIGHT" relativeKey="$parent.Label" relativePoint="LEFT" x="-5" y="0" />
</Anchors>
<TexCoords left="0.81" right="0.94" top="0.5" bottom="1"/>
</Texture-->
<Texture name="$parentRight" parentKey="Right" file="Interface\Tooltips\UI-Tooltip-Border">
<Size y="8" />
<Anchors>
<Anchor point="LEFT" relativeKey="$parent.Label" relativePoint="RIGHT" x="5" y="0" />
<Anchor point="RIGHT" x="-10" y="0" />
</Anchors>
<TexCoords left="0.81" right="0.94" top="0.5" bottom="1"/>
</Texture>
</Layer>
</Layers>
</Frame>
<!-- TEMPLATES FOR DYNAMICALLY GENERATED VISUAL ELEMENTS (see lua file) -->
<!-- This represents a clickable (check) Bag Button which will select the current container for options -->
<CheckButton name="BaudBagOptionsBagTemplate" inherits="ItemButtonTemplate" virtual="true">
<Size x="37" y="37" />
<CheckedTexture alphaMode="ADD" file="Interface\Buttons\CheckButtonHilight" />
<Scripts>
<OnClick function="BaudBagOptionsBag_OnClick" />
</Scripts>
</CheckButton>
<!-- this is the visual representation of a container in which bags are joined (border around the joined bags) -->
<Frame name="BaudBagOptionsContainerTemplate" virtual="true">
<Size x="1" y="50" />
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<BackgroundInsets>
<AbsInset left="5" right="5" top="5" bottom="5" />
</BackgroundInsets>
<TileSize>
<AbsValue val="16" />
</TileSize>
<EdgeSize>
<AbsValue val="16" />
</EdgeSize>
</Backdrop>
</Frame>
<!-- This is the checkbox between two bags that marks if the box is joined or not -->
<CheckButton name="BaudBagOptionsJoinCheckTemplate" inherits="OptionsCheckButtonTemplate" virtual="true">
<Size x="26" y="26" />
<HitRectInsets>
<AbsInset left="0" right="0" top="0" bottom="0" />
</HitRectInsets>
<Scripts>
<OnClick function="BaudBagOptionsJoinCheck_OnClick" />
</Scripts>
</CheckButton>
<!-- TEMPLATES USED IN THE XML DECLARATION OF THE FRAME-->
<CheckButton name="BaudBagOptionsCheckButtonTemplate" inherits="OptionsCheckButtonTemplate" virtual="true">
<Size x="26" y="26" />
<HitRectInsets>
<AbsInset left="0" right="0" top="0" bottom="0" />
</HitRectInsets>
<Scripts>
<OnClick function="BaudBagOptionsCheckButton_OnClick" />
</Scripts>
</CheckButton>
<Slider name="BaudBagOptionsSliderTemplate" inherits="OptionsSliderTemplate" virtual="true">
<Size x="200" y="18" />
<Scripts>
<OnValueChanged function="BaudBagSlider_OnValueChanged" />
</Scripts>
</Slider>
<!-- actual frame -->
<Frame name="BaudBagOptions">
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentTitle" parentKey="Title" inherits="GameFontNormalLarge">
<Anchors>
<Anchor point="TOPLEFT" x="10" y="-10" />
</Anchors>
</FontString>
<FontString name="$parentVersionText" parentKey="Version" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="BOTTOMLEFT" relativeTo="$parentTitle" relativePoint="BOTTOMRIGHT" x="5" y="1" />
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Frame name="$parentGroupGlobal" parentKey="GroupGlobal">
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.Title" relativePoint="BOTTOMLEFT" y="-10" />
<Anchor point="RIGHT" x="-10" />
</Anchors>
<Size y="120" />
<Frames>
<Frame name="$parentHeader" parentKey="Header" inherits="BaudBagGroupHeaderTemplate">
<Anchors>
<Anchor point="TOPLEFT" />
<Anchor point="RIGHT" />
</Anchors>
<Scripts>
<OnLoad>
self.Label:SetText(BaudBagLocalized.OptionsGroupGlobal);
</OnLoad>
</Scripts>
</Frame>
<CheckButton name="$parentCheckButton1" parentKey="CheckButton1" inherits="BaudBagOptionsCheckButtonTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.Header" relativePoint="BOTTOMLEFT" x="20" y="-7" />
</Anchors>
</CheckButton>
<CheckButton name="$parentCheckButton2" parentKey="CheckButton2" inherits="BaudBagOptionsCheckButtonTemplate" id="2">
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.CheckButton1" relativePoint="BOTTOMLEFT" y="-5" />
</Anchors>
</CheckButton>
<CheckButton name="$parentCheckButton3" parentKey="CheckButton3" inherits="BaudBagOptionsCheckButtonTemplate" id="3">
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.CheckButton2" relativePoint="BOTTOMLEFT" y="-5" />
</Anchors>
</CheckButton>
</Frames>
</Frame>
<Frame name="$parentGroupContainer" parentKey="GroupContainer">
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.GroupGlobal" relativePoint="BOTTOMLEFT" y="-10" />
<Anchor point="BOTTOMRIGHT" x="-10" y="10" />
</Anchors>
<Size y="200" />
<Frames>
<Frame name="$parentHeader" parentKey="Header" inherits="BaudBagGroupHeaderTemplate">
<Anchors>
<Anchor point="TOPLEFT" />
<Anchor point="RIGHT" />
</Anchors>
<Scripts>
<OnLoad>
self.Label:SetText(BaudBagLocalized.OptionsGroupContainer);
</OnLoad>
</Scripts>
</Frame>
<Frame name="$parentSetDropDown" parentKey="SetSelection" inherits="UIDropDownMenuTemplate" enableMouse="true">
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.Header" relativePoint="BOTTOMLEFT" y="-25" />
</Anchors>
<Size x="160" y="25" />
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentLabel" parentKey="Label" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" x="16" y="3" />
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<CheckButton name="$parentEnabledCheck" parentKey="EnabledCheck" inherits="OptionsCheckButtonTemplate" id="Enabled">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentSetDropDown" relativePoint="TOPRIGHT" x="5" y="-2" />
</Anchors>
<Scripts>
<OnClick function="BaudBagEnabledCheck_OnClick" />
</Scripts>
</CheckButton>
<CheckButton name="$parentCloseAllCheck" parentKey="CloseAllCheck" inherits="OptionsCheckButtonTemplate" id="CloseAll">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentEnabledCheckText" relativePoint="TOPRIGHT" x="10" y="6" />
</Anchors>
<Scripts>
<OnClick function="BaudBagCloseAllCheck_OnClick" />
</Scripts>
</CheckButton>
<!-- THIS is where the bag icons are getting auto-generated on init! -->
<Frame name="$parentBagFrame" parentKey="BagFrame">
<Anchors>
<Anchor point="TOP" relativeKey="$parent.SetSelection" relativePoint="BOTTOM" y="-10" />
<Anchor point="LEFT" />
<Anchor point="RIGHT" />
</Anchors>
<Size y="80" />
</Frame>
<EditBox name="$parentNameEditBox" inherits="InputBoxTemplate" parentKey="NameInput" letters="40" autoFocus="false">
<Size x="200" y="16" />
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.BagFrame" relativePoint="BOTTOMLEFT" x="40" y="-20" />
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentText" parentKey="Text" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="-5" y="5" />
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnEscapePressed>
self:ClearFocus();
</OnEscapePressed>
<OnTextChanged function="BaudBagOptionsNameEditBox_OnTextChanged" />
</Scripts>
</EditBox>
<Frame name="$parentBackgroundDropDown" inherits="UIDropDownMenuTemplate" parentKey="BackgroundSelection" enableMouse="true">
<Size x="160" y="25" />
<Anchors>
<Anchor point="LEFT" relativeTo="$parentNameEditBox" relativePoint="RIGHT" x="5" y="-2" />
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentLabel" parentKey="Label" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" x="16" y="1" />
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<CheckButton name="$parentCheckButton1" inherits="BaudBagOptionsCheckButtonTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentBackgroundDropDown" relativePoint="BOTTOMLEFT" x="20" y="-7" />
</Anchors>
</CheckButton>
<CheckButton name="$parentCheckButton2" inherits="BaudBagOptionsCheckButtonTemplate" id="2">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentCheckButton1" relativePoint="BOTTOMLEFT" x="0" y="8" />
</Anchors>
</CheckButton>
<CheckButton name="$parentCheckButton3" inherits="BaudBagOptionsCheckButtonTemplate" id="3">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentCheckButton2" relativePoint="BOTTOMLEFT" x="0" y="8" />
</Anchors>
</CheckButton>
<CheckButton name="$parentCheckButton4" inherits="BaudBagOptionsCheckButtonTemplate" id="4">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentCheckButton3" relativePoint="BOTTOMLEFT" x="0" y="8" />
</Anchors>
</CheckButton>
<Slider name="$parentSlider1" minValue="2" maxValue="20" valueStep="1" inherits="BaudBagOptionsSliderTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentNameEditBox" relativePoint="BOTTOMLEFT" x="-2" y="-22" />
</Anchors>
</Slider>
<Slider name="$parentSlider2" minValue="50" maxValue="200" valueStep="1" inherits="BaudBagOptionsSliderTemplate" id="2">
<Anchors>
<Anchor point="TOP" relativeTo="$parentSlider1" relativePoint="BOTTOM" y="-15" />
</Anchors>
</Slider>
</Frames>
</Frame>
</Frames>
<Scripts>
<OnLoad function="BaudBagOptions_OnLoad" />
<OnEvent function="BaudBagOptions_OnEvent" />
</Scripts>
</Frame>
</Ui>