-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMizusRaidTracker_UIDropDownMenuTemplates.xml
More file actions
421 lines (419 loc) · 13.6 KB
/
Copy pathMizusRaidTracker_UIDropDownMenuTemplates.xml
File metadata and controls
421 lines (419 loc) · 13.6 KB
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
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
<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">
<Button name="MRT_Lib_UIDropDownMenuButtonTemplate" virtual="true">
<Size x="100" y="16"/>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" setAllPoints="true" hidden="true"/>
</Layer>
<Layer level="ARTWORK">
<Texture name="$parentCheck" file="Interface\Common\UI-DropDownRadioChecks">
<Size x="16" y="16"/>
<Anchors>
<Anchor point="LEFT">
<Offset x="0" y="0"/>
</Anchor>
</Anchors>
<TexCoords left="0" right="0.5" top="0.5" bottom="1.0"/>
</Texture>
<Texture name="$parentUnCheck" file="Interface\Common\UI-DropDownRadioChecks">
<Size x="16" y="16"/>
<Anchors>
<Anchor point="LEFT">
<Offset x="0" y="0"/>
</Anchor>
</Anchors>
<TexCoords left="0.5" right="1.0" top="0.5" bottom="1.0"/>
</Texture>
<Texture name="$parentIcon" hidden="true">
<Size>
<AbsDimension x="16" y="16"/>
</Size>
<Anchors>
<Anchor point="RIGHT">
<Offset x="0" y="0"/>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Button name="$parentColorSwatch" hidden="true">
<Size>
<AbsDimension x="16" y="16"/>
</Size>
<Anchors>
<Anchor point="RIGHT">
<Offset>
<AbsDimension x="-6" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentSwatchBg">
<Size>
<AbsDimension x="14" y="14"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1.0" g="1.0" b="1.0"/>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnClick>
CloseMenus();
MRT_Lib_UIDropDownMenuButton_OpenColorPicker(self:GetParent());
</OnClick>
<OnEnter>
MRT_Lib_CloseDropDownMenus(self:GetParent():GetParent():GetID() + 1);
_G[self:GetName().."SwatchBg"]:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
MRT_Lib_UIDropDownMenu_StopCounting(self:GetParent():GetParent());
</OnEnter>
<OnLeave>
_G[self:GetName().."SwatchBg"]:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
MRT_Lib_UIDropDownMenu_StartCounting(self:GetParent():GetParent());
</OnLeave>
</Scripts>
<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\ChatFrameColorSwatch"/>
</Button>
<Button name="$parentExpandArrow" hidden="true">
<Size>
<AbsDimension x="16" y="16"/>
</Size>
<Anchors>
<Anchor point="RIGHT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
MRT_Lib_ToggleDropDownMenu(self:GetParent():GetParent():GetID() + 1, self:GetParent().value, nil, nil, nil, nil, self:GetParent().menuList, self);
</OnClick>
<OnEnter>
local level = self:GetParent():GetParent():GetID() + 1;
local listFrame = _G["MRT_Lib_DropDownList"..level];
if ( not listFrame or not listFrame:IsShown() or select(2, listFrame:GetPoint()) ~= self ) then
MRT_Lib_ToggleDropDownMenu(level, self:GetParent().value, nil, nil, nil, nil, self:GetParent().menuList, self);
end
MRT_Lib_UIDropDownMenu_StopCounting(self:GetParent():GetParent());
</OnEnter>
<OnLeave>
MRT_Lib_UIDropDownMenu_StartCounting(self:GetParent():GetParent());
</OnLeave>
</Scripts>
<NormalTexture file="Interface\ChatFrame\ChatFrameExpandArrow"/>
</Button>
<Button name="$parentInvisibleButton" hidden="true" parentKey="invisibleButton">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMLEFT"/>
<Anchor point="RIGHT" relativeTo="$parentColorSwatch" relativePoint="LEFT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnEnter>
MRT_Lib_UIDropDownMenu_StopCounting(self:GetParent():GetParent());
MRT_Lib_CloseDropDownMenus(self:GetParent():GetParent():GetID() + 1);
local parent = self:GetParent();
if ( parent.tooltipTitle and parent.tooltipWhileDisabled) then
if ( parent.tooltipOnButton ) then
GameTooltip:SetOwner(parent, "ANCHOR_RIGHT");
GameTooltip:AddLine(parent.tooltipTitle, 1.0, 1.0, 1.0);
GameTooltip:AddLine(parent.tooltipText, nil, nil, nil, true);
GameTooltip:Show();
else
GameTooltip_AddNewbieTip(parent, parent.tooltipTitle, 1.0, 1.0, 1.0, parent.tooltipText, 1);
end
end
</OnEnter>
<OnLeave>
MRT_Lib_UIDropDownMenu_StartCounting(self:GetParent():GetParent());
GameTooltip:Hide();
</OnLeave>
</Scripts>
</Button>
</Frames>
<Scripts>
<OnLoad>
self:SetFrameLevel(self:GetParent():GetFrameLevel()+2);
</OnLoad>
<OnClick>
MRT_Lib_UIDropDownMenuButton_OnClick(self, button, down);
</OnClick>
<OnEnter>
if ( self.hasArrow ) then
local level = self:GetParent():GetID() + 1;
local listFrame = _G["MRT_Lib_DropDownList"..level];
if ( not listFrame or not listFrame:IsShown() or select(2, listFrame:GetPoint()) ~= self ) then
MRT_Lib_ToggleDropDownMenu(self:GetParent():GetID() + 1, self.value, nil, nil, nil, nil, self.menuList, self);
end
else
MRT_Lib_CloseDropDownMenus(self:GetParent():GetID() + 1);
end
_G[self:GetName().."Highlight"]:Show();
MRT_Lib_UIDropDownMenu_StopCounting(self:GetParent());
if ( self.tooltipTitle ) then
if ( self.tooltipOnButton ) then
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:AddLine(self.tooltipTitle, 1.0, 1.0, 1.0);
GameTooltip:AddLine(self.tooltipText, nil, nil, nil, true);
GameTooltip:Show();
else
GameTooltip_AddNewbieTip(self, self.tooltipTitle, 1.0, 1.0, 1.0, self.tooltipText, 1);
end
end
</OnEnter>
<OnLeave>
_G[self:GetName().."Highlight"]:Hide();
MRT_Lib_UIDropDownMenu_StartCounting(self:GetParent());
GameTooltip:Hide();
</OnLeave>
<OnEnable>
self.invisibleButton:Hide();
</OnEnable>
<OnDisable>
self.invisibleButton:Show();
</OnDisable>
</Scripts>
<ButtonText name="$parentNormalText">
<Anchors>
<Anchor point="LEFT">
<Offset x="-5" y="0"/>
</Anchor>
</Anchors>
</ButtonText>
<NormalFont style="GameFontHighlightSmallLeft"/>
<HighlightFont style="GameFontHighlightSmallLeft"/>
<DisabledFont style="GameFontDisableSmallLeft"/>
</Button>
<Button name="MRT_Lib_UIDropDownListTemplate" hidden="true" frameStrata="DIALOG" enableMouse="true" virtual="true">
<Frames>
<Frame name="$parentBackdrop" setAllPoints="true">
<Scripts>
<OnLoad>
if Mixin and BackdropTemplateMixin then
Mixin(self,BackdropTemplateMixin)
end
local BACKDROP_DARK_DIALOG_32_32 = BACKDROP_DARK_DIALOG_32_32 or {
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background-Dark",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
tile = true,
tileEdge = true,
tileSize = 32,
edgeSize = 32,
insets = { left = 11, right = 11, top = 11, bottom = 10 },
};
self:SetBackdrop(BACKDROP_DARK_DIALOG_32_32);
</OnLoad>
</Scripts>
</Frame>
<Frame name="$parentMenuBackdrop" setAllPoints="true">
<Scripts>
<OnLoad>
if Mixin and BackdropTemplateMixin then
Mixin(self,BackdropTemplateMixin)
end
local BACKDROP_MIXED_TOOLTIP_16_16 = BACKDROP_MIXED_TOOLTIP_16_16 or {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Glues\\Common\\Glue-Tooltip-Border",
tile = true,
tileEdge = true,
tileSize = 16,
edgeSize = 16,
insets = { left = 10, right = 5, top = 4, bottom = 9 },
};
self:SetBackdrop(BACKDROP_MIXED_TOOLTIP_16_16);
self:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b);
self:SetBackdropColor(TOOLTIP_DEFAULT_BACKGROUND_COLOR.r, TOOLTIP_DEFAULT_BACKGROUND_COLOR.g, TOOLTIP_DEFAULT_BACKGROUND_COLOR.b);
</OnLoad>
</Scripts>
</Frame>
<Button name="$parentButton1" inherits="MRT_Lib_UIDropDownMenuButtonTemplate" id="1"/>
<Button name="$parentButton2" inherits="MRT_Lib_UIDropDownMenuButtonTemplate" id="2"/>
<Button name="$parentButton3" inherits="MRT_Lib_UIDropDownMenuButtonTemplate" id="3"/>
<Button name="$parentButton4" inherits="MRT_Lib_UIDropDownMenuButtonTemplate" id="4"/>
<Button name="$parentButton5" inherits="MRT_Lib_UIDropDownMenuButtonTemplate" id="5"/>
<Button name="$parentButton6" inherits="MRT_Lib_UIDropDownMenuButtonTemplate" id="6"/>
<Button name="$parentButton7" inherits="MRT_Lib_UIDropDownMenuButtonTemplate" id="7"/>
<Button name="$parentButton8" inherits="MRT_Lib_UIDropDownMenuButtonTemplate" id="8"/>
</Frames>
<Scripts>
<OnClick>
self:Hide();
</OnClick>
<OnEnter>
MRT_Lib_UIDropDownMenu_StopCounting(self, motion);
</OnEnter>
<OnLeave>
MRT_Lib_UIDropDownMenu_StartCounting(self, motion);
</OnLeave>
<OnUpdate>
MRT_Lib_UIDropDownMenu_OnUpdate(self, elapsed);
</OnUpdate>
<OnShow>
for i=1, MRT_LIB_UIDROPDOWNMENU_MAXBUTTONS do
if (not self.noResize) then
_G[self:GetName().."Button"..i]:SetWidth(self.maxWidth);
end
end
if (not self.noResize) then
self:SetWidth(self.maxWidth+25);
end
self.showTimer = nil;
if ( self:GetID() > 1 ) then
self.parent = _G["MRT_Lib_DropDownList"..(self:GetID() - 1)];
end
</OnShow>
<OnHide>
MRT_Lib_UIDropDownMenu_OnHide(self);
</OnHide>
</Scripts>
</Button>
<Frame name="MRT_Lib_UIDropDownMenuTemplate" virtual="true">
<Size>
<AbsDimension x="40" y="32"/>
</Size>
<Layers>
<Layer level="ARTWORK">
<Texture name="$parentLeft" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
<Size>
<AbsDimension x="25" y="64"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="17"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0" right="0.1953125" top="0" bottom="1"/>
</Texture>
<Texture name="$parentMiddle" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
<Size>
<AbsDimension x="115" y="64"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
</Anchors>
<TexCoords left="0.1953125" right="0.8046875" top="0" bottom="1"/>
</Texture>
<Texture name="$parentRight" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
<Size>
<AbsDimension x="25" y="64"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/>
</Anchors>
<TexCoords left="0.8046875" right="1" top="0" bottom="1"/>
</Texture>
<FontString parentKey="Text" name="$parentText" inherits="GameFontHighlightSmall" wordwrap="false" justifyH="RIGHT">
<Size>
<AbsDimension x="0" y="10"/>
</Size>
<Anchors>
<Anchor point="RIGHT" relativeTo="$parentRight">
<Offset>
<AbsDimension x="-43" y="2"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
<Layer level="OVERLAY">
<Texture parentKey="Icon" name="$parentIcon" hidden="true">
<Size>
<AbsDimension x="16" y="16"/>
</Size>
<Anchors>
<Anchor point="LEFT">
<Offset x="30" y="2"/>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Button parentKey="Button" name="$parentButton" motionScriptsWhileDisabled="true" >
<Size>
<AbsDimension x="24" y="24"/>
</Size>
<Anchors>
<Anchor point="TOPRIGHT" relativeTo="$parentRight">
<Offset>
<AbsDimension x="-16" y="-18"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnEnter>
local parent = self:GetParent();
local myscript = parent:GetScript("OnEnter");
if(myscript ~= nil) then
myscript(parent);
end
</OnEnter>
<OnLeave>
local parent = self:GetParent();
local myscript = parent:GetScript("OnLeave");
if(myscript ~= nil) then
myscript(parent);
end
</OnLeave>
<OnClick>
MRT_Lib_ToggleDropDownMenu(nil, nil, self:GetParent());
PlaySound(856);
</OnClick>
</Scripts>
<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up">
<Size>
<AbsDimension x="24" y="24"/>
</Size>
<Anchors>
<Anchor point="RIGHT"/>
</Anchors>
</NormalTexture>
<PushedTexture name="$parentPushedTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down">
<Size>
<AbsDimension x="24" y="24"/>
</Size>
<Anchors>
<Anchor point="RIGHT"/>
</Anchors>
</PushedTexture>
<DisabledTexture name="$parentDisabledTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled">
<Size>
<AbsDimension x="24" y="24"/>
</Size>
<Anchors>
<Anchor point="RIGHT"/>
</Anchors>
</DisabledTexture>
<HighlightTexture name="$parentHighlightTexture" file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD">
<Size>
<AbsDimension x="24" y="24"/>
</Size>
<Anchors>
<Anchor point="RIGHT"/>
</Anchors>
</HighlightTexture>
</Button>
</Frames>
<Scripts>
<OnHide>
MRT_Lib_CloseDropDownMenus();
</OnHide>
</Scripts>
</Frame>
</Ui>