vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | <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/ |
2 | ..\FrameXML\UI.xsd"> |
||
3 | |||
4 | |||
5 | <CheckButton name="DHUD_Check_Template" inherits="OptionsCheckButtonTemplate" hidden="false" virtual="true"> |
||
6 | <HitRectInsets><AbsInset left="0" right="0" top="0" bottom="0"/></HitRectInsets> |
||
7 | <Size><AbsDimension x="25" y="25"/> |
||
8 | </Size> |
||
9 | <Anchors> |
||
10 | <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="DHUDOptionsFrame"> |
||
11 | <Offset><AbsDimension x="0" y="0"/></Offset> |
||
12 | </Anchor> |
||
13 | </Anchors> |
||
14 | <Scripts> |
||
15 | <OnLoad> |
||
16 | this.setting_name = string.gsub( this:GetName() , "DHUD_Check_", ""); |
||
17 | getglobal( this:GetName().."Text"):SetText( " "..DHUDO_locale[this.setting_name] ); |
||
18 | </OnLoad> |
||
19 | <OnClick> |
||
20 | DHUD:ToggleConfig(this.setting_name); |
||
21 | </OnClick> |
||
22 | <OnShow> |
||
23 | getglobal(this:GetName()):SetChecked(DHUD:GetConfig(this.setting_name)); |
||
24 | </OnShow> |
||
25 | <OnEnter> |
||
26 | GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); |
||
27 | GameTooltip:SetText(DHUDO_locale[this.setting_name.."_tooltip"], 1, 1, 1, 1); |
||
28 | </OnEnter> |
||
29 | <OnLeave> |
||
30 | GameTooltip:Hide(); |
||
31 | </OnLeave> |
||
32 | </Scripts> |
||
33 | </CheckButton> |
||
34 | |||
35 | <!-- Header Text --> |
||
36 | <Frame name="DHUD_HeaderTemplate" hidden="false" virtual="true"> |
||
37 | <Layers> |
||
38 | <Layer level="ARTWORK"> |
||
39 | <FontString name="$parentText" inherits="GameFontHighlight" text=""></FontString> |
||
40 | </Layer> |
||
41 | </Layers> |
||
42 | <Scripts> |
||
43 | <OnLoad> |
||
44 | DHUDO_Header_OnLoad(0,0); |
||
45 | </OnLoad> |
||
46 | </Scripts> |
||
47 | </Frame> |
||
48 | |||
49 | |||
50 | <Button name="DHUD_TabButtonTemplate" virtual="true"> |
||
51 | <Size> |
||
52 | <AbsDimension x="115" y="32"/> |
||
53 | </Size> |
||
54 | <Layers> |
||
55 | <Layer level="BACKGROUND"> |
||
56 | <Texture name="$parentLeftDisabled" file="Interface\AddOns\DHUD_Options\tab1"> |
||
57 | <Size> |
||
58 | <AbsDimension x="20" y="50"/> |
||
59 | </Size> |
||
60 | <Anchors> |
||
61 | <Anchor point="BOTTOMLEFT"> |
||
62 | <Offset> |
||
63 | <AbsDimension x="0" y="-25"/> |
||
64 | </Offset> |
||
65 | </Anchor> |
||
66 | </Anchors> |
||
67 | <TexCoords left="0" right="0.20" top="0" bottom="1.0"/> |
||
68 | </Texture> |
||
69 | <Texture name="$parentMiddleDisabled" file="Interface\AddOns\DHUD_Options\tab1"> |
||
70 | <Size> |
||
71 | <AbsDimension x="32" y="50"/> |
||
72 | </Size> |
||
73 | <Anchors> |
||
74 | <Anchor point="LEFT" relativeTo="$parentLeftDisabled" relativePoint="RIGHT"/> |
||
75 | </Anchors> |
||
76 | <TexCoords left="0.20" right="0.80" top="0" bottom="1.0"/> |
||
77 | </Texture> |
||
78 | <Texture name="$parentRightDisabled" file="Interface\AddOns\DHUD_Options\tab1"> |
||
79 | <Size> |
||
80 | <AbsDimension x="20" y="50"/> |
||
81 | </Size> |
||
82 | <Anchors> |
||
83 | <Anchor point="LEFT" relativeTo="$parentMiddleDisabled" relativePoint="RIGHT"/> |
||
84 | </Anchors> |
||
85 | <TexCoords left="0.80" right="1.0" top="0" bottom="1.0"/> |
||
86 | </Texture> |
||
87 | <Texture name="$parentLeft" file="Interface\AddOns\DHUD_Options\tab2"> |
||
88 | <Size> |
||
89 | <AbsDimension x="20" y="50"/> |
||
90 | </Size> |
||
91 | <Anchors> |
||
92 | <Anchor point="BOTTOMLEFT"> |
||
93 | <Offset> |
||
94 | <AbsDimension x="0" y="-25"/> |
||
95 | </Offset> |
||
96 | </Anchor> |
||
97 | </Anchors> |
||
98 | <TexCoords left="0" right="0.20" top="0" bottom="1.0"/> |
||
99 | </Texture> |
||
100 | <Texture name="$parentMiddle" file="Interface\AddOns\DHUD_Options\tab2"> |
||
101 | <Size> |
||
102 | <AbsDimension x="32" y="50"/> |
||
103 | </Size> |
||
104 | <Anchors> |
||
105 | <Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/> |
||
106 | </Anchors> |
||
107 | <TexCoords left="0.20" right="0.80" top="0" bottom="1.0"/> |
||
108 | </Texture> |
||
109 | <Texture name="$parentRight" file="Interface\AddOns\DHUD_Options\tab2"> |
||
110 | <Size> |
||
111 | <AbsDimension x="20" y="50"/> |
||
112 | </Size> |
||
113 | <Anchors> |
||
114 | <Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/> |
||
115 | </Anchors> |
||
116 | <TexCoords left="0.80" right="1.0" top="0" bottom="1.0"/> |
||
117 | </Texture> |
||
118 | </Layer> |
||
119 | </Layers> |
||
120 | <Scripts> |
||
121 | <OnLoad> |
||
122 | PanelTemplates_TabResize(0); |
||
123 | getglobal(this:GetName().."HighlightTexture"):SetWidth(this:GetTextWidth() + 31); |
||
124 | </OnLoad> |
||
125 | </Scripts> |
||
126 | <NormalText name="$parentText" inherits="GameFontNormalSmall"> |
||
127 | <Size> |
||
128 | <AbsDimension x="0" y="13"/> |
||
129 | </Size> |
||
130 | <Anchors> |
||
131 | <Anchor point="BOTTOM"> |
||
132 | <Offset> |
||
133 | <AbsDimension x="0" y="5"/> |
||
134 | </Offset> |
||
135 | </Anchor> |
||
136 | </Anchors> |
||
137 | </NormalText> |
||
138 | <HighlightText name="$parentHighlightText" inherits="GameFontHighlightSmall"> |
||
139 | <Size> |
||
140 | <AbsDimension x="0" y="13"/> |
||
141 | </Size> |
||
142 | <Anchors> |
||
143 | <Anchor point="BOTTOM"> |
||
144 | <Offset> |
||
145 | <AbsDimension x="0" y="5"/> |
||
146 | </Offset> |
||
147 | </Anchor> |
||
148 | </Anchors> |
||
149 | </HighlightText> |
||
150 | <DisabledText name="$parentDisabledText" inherits="GameFontHighlightSmall"> |
||
151 | <Size> |
||
152 | <AbsDimension x="0" y="13"/> |
||
153 | </Size> |
||
154 | <Anchors> |
||
155 | <Anchor point="BOTTOM"> |
||
156 | <Offset> |
||
157 | <AbsDimension x="0" y="5"/> |
||
158 | </Offset> |
||
159 | </Anchor> |
||
160 | </Anchors> |
||
161 | </DisabledText> |
||
162 | <HighlightTexture name="$parentHighlightTexture" file="Interface\PaperDollInfoFrame\UI-Character-Tab-Highlight" alphaMode="ADD"> |
||
163 | <Size> |
||
164 | <AbsDimension x="4" y="38"/> |
||
165 | </Size> |
||
166 | <Anchors> |
||
167 | <Anchor point="BOTTOM"> |
||
168 | <Offset> |
||
169 | <AbsDimension x="1" y="-8"/> |
||
170 | </Offset> |
||
171 | </Anchor> |
||
172 | </Anchors> |
||
173 | </HighlightTexture> |
||
174 | <Scripts> |
||
175 | <OnLoad> |
||
176 | this:SetText(DHUDO_locale[this:GetName()]); |
||
177 | getglobal(this:GetName().."HighlightTexture"):SetWidth(this:GetTextWidth() + 31); |
||
178 | PanelTemplates_TabResize(-15, nil, nil, 150); |
||
179 | </OnLoad> |
||
180 | <OnClick> |
||
181 | PanelTemplates_SetTab(DHUDOptionsFrame, this:GetID()); |
||
182 | |||
183 | for i = 1, DHUDO_NUMTABS do |
||
184 | if i == this:GetID() then |
||
185 | getglobal("DHUD_Tab"..i):Show(); |
||
186 | else |
||
187 | getglobal("DHUD_Tab"..i):Hide(); |
||
188 | end |
||
189 | end |
||
190 | |||
191 | </OnClick> |
||
192 | </Scripts> |
||
193 | </Button> |
||
194 | |||
195 | |||
196 | <Button name="DHUD_DecButtonTemplate" virtual="true"> |
||
197 | <Size> |
||
198 | <AbsDimension x="23" y="22"/> |
||
199 | </Size> |
||
200 | <Anchors> |
||
201 | <Anchor point="LEFT" relativeTo="DHUDOptionsFrame" relativePoint="RIGHT"> |
||
202 | <Offset> |
||
203 | <AbsDimension x="1" y="0"/> |
||
204 | </Offset> |
||
205 | </Anchor> |
||
206 | </Anchors> |
||
207 | <Scripts> |
||
208 | <OnLoad> |
||
209 | local parent = this:GetParent(); |
||
210 | this.setting_name = string.gsub( parent:GetName() , "DHUD_Pos_", ""); |
||
211 | this:RegisterForClicks("LeftButtonUp", "RightButtonUp"); |
||
212 | </OnLoad> |
||
213 | <OnClick> |
||
214 | if (arg1 == "RightButton") then |
||
215 | DHUD:SetConfig(this.setting_name, DHUD:GetConfig(this.setting_name) - 10); |
||
216 | else |
||
217 | DHUD:SetConfig(this.setting_name, DHUD:GetConfig(this.setting_name) - 1); |
||
218 | end |
||
219 | local parent = this:GetParent(); |
||
220 | local text = getglobal(parent:GetName().."_Minitext"); |
||
221 | text:SetText( DHUD:GetConfig(this.setting_name) ); |
||
222 | DHUD:init(); |
||
223 | </OnClick> |
||
224 | </Scripts> |
||
225 | <NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/> |
||
226 | <PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/> |
||
227 | <DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled"/> |
||
228 | <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/> |
||
229 | </Button> |
||
230 | |||
231 | |||
232 | <Button name="DHUD_IncButtonTemplate" virtual="true"> |
||
233 | <Size> |
||
234 | <AbsDimension x="23" y="22"/> |
||
235 | </Size> |
||
236 | <Anchors> |
||
237 | <Anchor point="LEFT" relativeTo="DHUDOptionsFrame" relativePoint="RIGHT"> |
||
238 | <Offset> |
||
239 | <AbsDimension x="-1" y="0"/> |
||
240 | </Offset> |
||
241 | </Anchor> |
||
242 | </Anchors> |
||
243 | <Scripts> |
||
244 | <OnLoad> |
||
245 | local parent = this:GetParent(); |
||
246 | this.setting_name = string.gsub( parent:GetName() , "DHUD_Pos_", ""); |
||
247 | this:RegisterForClicks("LeftButtonUp", "RightButtonUp"); |
||
248 | </OnLoad> |
||
249 | <OnClick> |
||
250 | if (arg1 == "RightButton") then |
||
251 | DHUD:SetConfig(this.setting_name, DHUD:GetConfig(this.setting_name) + 10); |
||
252 | else |
||
253 | DHUD:SetConfig(this.setting_name, DHUD:GetConfig(this.setting_name) + 1); |
||
254 | end |
||
255 | local parent = this:GetParent(); |
||
256 | local text = getglobal(parent:GetName().."_Minitext"); |
||
257 | text:SetText( DHUD:GetConfig(this.setting_name) ); |
||
258 | DHUD:init(); |
||
259 | </OnClick> |
||
260 | </Scripts> |
||
261 | <NormalTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Up"/> |
||
262 | <PushedTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Down"/> |
||
263 | <DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled"/> |
||
264 | <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/> |
||
265 | </Button> |
||
266 | |||
267 | |||
268 | <EditBox name="DHUD_MiniTextTemplate" letters="5" historyLines="0" autoFocus="false" virtual="true"> |
||
269 | <Size> |
||
270 | <AbsDimension x="40" y="20"/> |
||
271 | </Size> |
||
272 | <Anchors> |
||
273 | <Anchor point="LEFT" relativeTo="DHUDOptionsFrame" relativePoint="RIGHT"> |
||
274 | <Offset> |
||
275 | <AbsDimension x="3" y="0"/> |
||
276 | </Offset> |
||
277 | </Anchor> |
||
278 | </Anchors> |
||
279 | <Layers> |
||
280 | <Layer level="BACKGROUND"> |
||
281 | <Texture name="$parentLeft" file="Interface\Common\Common-Input-Border"> |
||
282 | <Size> |
||
283 | <AbsDimension x="8" y="20"/> |
||
284 | </Size> |
||
285 | <Anchors> |
||
286 | <Anchor point="TOPLEFT"> |
||
287 | <Offset> |
||
288 | <AbsDimension x="-5" y="0"/> |
||
289 | </Offset> |
||
290 | </Anchor> |
||
291 | </Anchors> |
||
292 | <TexCoords left="0" right="0.0625" top="0" bottom="0.625"/> |
||
293 | </Texture> |
||
294 | <Texture name="$parentRight" file="Interface\Common\Common-Input-Border"> |
||
295 | <Size> |
||
296 | <AbsDimension x="8" y="20"/> |
||
297 | </Size> |
||
298 | <Anchors> |
||
299 | <Anchor point="RIGHT"> |
||
300 | <Offset> |
||
301 | <AbsDimension x="0" y="0"/> |
||
302 | </Offset> |
||
303 | </Anchor> |
||
304 | </Anchors> |
||
305 | <TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/> |
||
306 | </Texture> |
||
307 | <Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border"> |
||
308 | <Size> |
||
309 | <AbsDimension x="10" y="20"/> |
||
310 | </Size> |
||
311 | <Anchors> |
||
312 | <Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/> |
||
313 | <Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"/> |
||
314 | </Anchors> |
||
315 | <TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/> |
||
316 | </Texture> |
||
317 | </Layer> |
||
318 | |||
319 | <Layer level="ARTWORK"> |
||
320 | <FontString name="$parentText" inherits="GameFontNormalSmall" text="test text"> |
||
321 | <Size> |
||
322 | <AbsDimension x="0" y="13"/> |
||
323 | </Size> |
||
324 | <Anchors> |
||
325 | <Anchor point="LEFT"> |
||
326 | <Offset> |
||
327 | <AbsDimension x="60" y="0"/> |
||
328 | </Offset> |
||
329 | </Anchor> |
||
330 | </Anchors> |
||
331 | </FontString> |
||
332 | </Layer> |
||
333 | |||
334 | </Layers> |
||
335 | <Scripts> |
||
336 | <OnLoad> |
||
337 | local parent = this:GetParent(); |
||
338 | this.setting_name = string.gsub( parent:GetName() , "DHUD_Pos_", ""); |
||
339 | getglobal( this:GetName().."Text"):SetText( " "..(DHUDO_locale[this.setting_name] or "No Locale") ); |
||
340 | this:SetText( tonumber(DHUD:GetConfig(this.setting_name)) or 0 ); |
||
341 | this.oldvalue = this:GetText(); |
||
342 | </OnLoad> |
||
343 | <OnEnterPressed> |
||
344 | this:ClearFocus(); |
||
345 | </OnEnterPressed> |
||
346 | <OnEscapePressed> |
||
347 | this:ClearFocus(); |
||
348 | </OnEscapePressed> |
||
349 | <OnTextChanged> |
||
350 | if this:GetNumber() == this:GetText() then |
||
351 | this.oldvalue = this:GetText(); |
||
352 | end |
||
353 | this:SetText( this:GetNumber() or 0 ); |
||
354 | DHUD:SetConfig( this.setting_name, this:GetText() ); |
||
355 | </OnTextChanged> |
||
356 | <OnEditFocusLost> |
||
357 | this:HighlightText(0, 0); |
||
358 | DHUD:init(); |
||
359 | </OnEditFocusLost> |
||
360 | <OnEditFocusGained> |
||
361 | this:HighlightText(); |
||
362 | </OnEditFocusGained> |
||
363 | </Scripts> |
||
364 | <FontString inherits="ChatFontNormal"/> |
||
365 | </EditBox> |
||
366 | |||
367 | |||
368 | |||
369 | |||
370 | |||
371 | <Frame name="DHUD_PosTemplate" virtual="true"> |
||
372 | <Size> |
||
373 | <AbsDimension x="200" y="25"/> |
||
374 | </Size> |
||
375 | <Anchors> |
||
376 | <Anchor point="TOPLEFT" relativeTo="DHUDOptionsFrame" relativePoint="TOPLEFT"> |
||
377 | <Offset><AbsDimension x="10" y="-70"/></Offset> |
||
378 | </Anchor> |
||
379 | </Anchors> |
||
380 | <Frames> |
||
381 | <Button name="$parent_DecButton" inherits="DHUD_DecButtonTemplate"> |
||
382 | <Anchors> |
||
383 | <Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT"> |
||
384 | <Offset><AbsDimension x="0" y="0"/></Offset> |
||
385 | </Anchor> |
||
386 | </Anchors> |
||
387 | </Button> |
||
388 | |||
389 | <EditBox name="$parent_Minitext" inherits="DHUD_MiniTextTemplate"> |
||
390 | <Anchors> |
||
391 | <Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT"> |
||
392 | <Offset><AbsDimension x="23" y="0"/></Offset> |
||
393 | </Anchor> |
||
394 | </Anchors> |
||
395 | </EditBox> |
||
396 | |||
397 | <Button name="$parent_IncButton" inherits="DHUD_IncButtonTemplate"> |
||
398 | <Anchors> |
||
399 | <Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT"> |
||
400 | <Offset><AbsDimension x="60" y="0"/></Offset> |
||
401 | </Anchor> |
||
402 | </Anchors> |
||
403 | </Button> |
||
404 | </Frames> |
||
405 | </Frame> |
||
406 | |||
407 | |||
408 | |||
409 | |||
410 | |||
411 | |||
412 | |||
413 | |||
414 | |||
415 | <!-- DROPDOWN TEMPLATE --> |
||
416 | <Frame name="DHUD_DropdownTemplate" inherits="UIDropDownMenuTemplate" virtual="true"> |
||
417 | <Size> |
||
418 | <AbsDimension x="128" y="16"/> |
||
419 | </Size> |
||
420 | <Layers> |
||
421 | <Layer level="BACKGROUND"> |
||
422 | <FontString name="$parentLabel" inherits="GameFontNormalSmall"> |
||
423 | <Anchors> |
||
424 | <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"> |
||
425 | <Offset> |
||
426 | <AbsDimension x="21" y="0"/> |
||
427 | </Offset> |
||
428 | </Anchor> |
||
429 | </Anchors> |
||
430 | </FontString> |
||
431 | </Layer> |
||
432 | </Layers> |
||
433 | <Scripts> |
||
434 | <OnLoad> |
||
435 | UIDropDownMenu_Initialize(this, DHUDO_DropDown_Initialize); |
||
436 | </OnLoad> |
||
437 | <OnEnter> |
||
438 | if ( this.tooltipText ) then |
||
439 | GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); |
||
440 | GameTooltip:SetText(this.tooltipText, nil, nil, nil, nil, 1); |
||
441 | end |
||
442 | </OnEnter> |
||
443 | <OnLeave> |
||
444 | GameTooltip:Hide(); |
||
445 | </OnLeave> |
||
446 | </Scripts> |
||
447 | </Frame> |
||
448 | |||
449 | |||
450 | <Frame name="DHUD_Edit_Template" virtual="true"> |
||
451 | <Size> |
||
452 | <AbsDimension x="330" y="46"/> |
||
453 | </Size> |
||
454 | <Anchors> |
||
455 | <Anchor point="TOPLEFT" relativeTo="DHUD_Header_textText" relativePoint="TOPLEFT"> |
||
456 | <Offset><AbsDimension x="10" y="-25"/></Offset> |
||
457 | </Anchor> |
||
458 | </Anchors> |
||
459 | <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Buttons\UI-SliderBar-Border" tile="true"> |
||
460 | <BackgroundInsets> |
||
461 | <AbsInset left="3" right="22" top="6" bottom="6" /> |
||
462 | </BackgroundInsets> |
||
463 | <TileSize> |
||
464 | <AbsValue val="16" /> |
||
465 | </TileSize> |
||
466 | <EdgeSize> |
||
467 | <AbsValue val="9" /> |
||
468 | </EdgeSize> |
||
469 | </Backdrop> |
||
470 | <Frames> |
||
471 | <ScrollFrame name="$parentScrollFrame" inherits="UIPanelScrollFrameTemplate"> |
||
472 | <Size> |
||
473 | <AbsDimension x="295" y="33"/> |
||
474 | </Size> |
||
475 | <Anchors> |
||
476 | <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT"> |
||
477 | <Offset> |
||
478 | <AbsDimension x="8" y="-7"/> |
||
479 | </Offset> |
||
480 | </Anchor> |
||
481 | </Anchors> |
||
482 | <ScrollChild> |
||
483 | |||
484 | <EditBox name="$parentText" multiLine="true" letters="255" autoFocus="false" enableMouse="true"> |
||
485 | <Size> |
||
486 | <AbsDimension x="295" y="33"/> |
||
487 | </Size> |
||
488 | <Scripts> |
||
489 | <OnTextChanged> |
||
490 | local scrollBar = getglobal(this:GetParent():GetName().."ScrollBar") |
||
491 | this:GetParent():UpdateScrollChildRect(); |
||
492 | local min, max = scrollBar:GetMinMaxValues(); |
||
493 | if ( max > 0 and (this.max ~= max) ) then |
||
494 | this.max = max; |
||
495 | scrollBar:SetValue(max); |
||
496 | end |
||
497 | </OnTextChanged> |
||
498 | <OnEscapePressed> |
||
499 | this:ClearFocus(); |
||
500 | </OnEscapePressed> |
||
501 | <OnEditFocusGained> |
||
502 | DHUDHelpFrame:Show(); |
||
503 | </OnEditFocusGained> |
||
504 | <OnEditFocusLost> |
||
505 | |||
506 | local name = string.gsub( this:GetParent():GetParent():GetName() , "DHUD_Edit_", ""); |
||
507 | local dropdown = getglobal("DHUD_Edit_"..name.."_Selection"); |
||
508 | DHUD:SetConfig( name , this:GetText() ); |
||
509 | |||
510 | UIDropDownMenu_SetSelectedID( dropdown, 1 ); |
||
511 | UIDropDownMenu_SetText( DHUDO_SELECTION[name]["table"][1] , dropdown); |
||
512 | |||
513 | for key, str in DHUDO_SELECTION[name]["values"] do |
||
514 | if DHUD:GetConfig(name) == str then |
||
515 | UIDropDownMenu_SetSelectedID( dropdown, key ); |
||
516 | droptext = DHUDO_SELECTION[name]["table"][key]; |
||
517 | UIDropDownMenu_SetText(droptext, dropdown); |
||
518 | end |
||
519 | end |
||
520 | |||
521 | DHUD:init(); |
||
522 | DHUDO_updateTexts(name); |
||
523 | DHUDHelpFrame:Hide(); |
||
524 | </OnEditFocusLost> |
||
525 | </Scripts> |
||
526 | <FontString font="Fonts\ARIALN.TTF"> |
||
527 | <Color r="1" g="1" b="1"/> |
||
528 | <FontHeight> |
||
529 | <AbsValue val="12"/> |
||
530 | </FontHeight> |
||
531 | </FontString> |
||
532 | </EditBox> |
||
533 | |||
534 | </ScrollChild> |
||
535 | </ScrollFrame> |
||
536 | |||
537 | <Button name="$parentClicker"> |
||
538 | <Anchors> |
||
539 | <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT"> |
||
540 | <Offset> |
||
541 | <AbsDimension x="-80" y="-8"/> |
||
542 | </Offset> |
||
543 | </Anchor> |
||
544 | <Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="BOTTOMRIGHT"> |
||
545 | <Offset> |
||
546 | <AbsDimension x="-8" y="8"/> |
||
547 | </Offset> |
||
548 | </Anchor> |
||
549 | </Anchors> |
||
550 | <Scripts> |
||
551 | <OnClick> |
||
552 | getglobal(this:GetParent():GetName().."ScrollFrameText"):SetFocus(); |
||
553 | </OnClick> |
||
554 | </Scripts> |
||
555 | </Button> |
||
556 | |||
557 | <Frame name="$parent_Selection" inherits="DHUD_DropdownTemplate" hidden="false"> |
||
558 | <Anchors> |
||
559 | <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="$parent"> |
||
560 | <Offset> |
||
561 | <AbsDimension x="-10" y="-15"/> |
||
562 | </Offset> |
||
563 | </Anchor> |
||
564 | </Anchors> |
||
565 | </Frame> |
||
566 | |||
567 | </Frames> |
||
568 | <Scripts> |
||
569 | <OnLoad> |
||
570 | this:SetBackdropColor(.1,.1,.1,1); |
||
571 | this.setting_name = string.gsub( this:GetName() , "DHUD_Edit_", ""); |
||
572 | </OnLoad> |
||
573 | <OnShow> |
||
574 | local droptext; |
||
575 | local dropdown = getglobal(this:GetName().."_Selection"); |
||
576 | |||
577 | local label = getglobal(this:GetName().."_SelectionLabel"); |
||
578 | label:SetText(DHUDO_locale[this.setting_name] or "no Locale"); |
||
579 | |||
580 | local box = getglobal(this:GetName().."ScrollFrameText"); |
||
581 | box:SetText( DHUD:GetConfig(this.setting_name) ); |
||
582 | |||
583 | local tipptext = DHUDO_SELECTION[this.setting_name]["ttt"]; |
||
584 | dropdown.tooltipText = tipptext; |
||
585 | |||
586 | UIDropDownMenu_SetSelectedID( dropdown, 1 ); |
||
587 | UIDropDownMenu_SetText( DHUDO_SELECTION[this.setting_name]["table"][1] , dropdown); |
||
588 | |||
589 | for key, str in DHUDO_SELECTION[this.setting_name]["values"] do |
||
590 | if DHUD:GetConfig(this.setting_name) == str then |
||
591 | UIDropDownMenu_SetSelectedID( dropdown, key ); |
||
592 | droptext = DHUDO_SELECTION[this.setting_name]["table"][key]; |
||
593 | UIDropDownMenu_SetText(droptext, dropdown); |
||
594 | end |
||
595 | end |
||
596 | |||
597 | </OnShow> |
||
598 | </Scripts> |
||
599 | </Frame> |
||
600 | |||
601 | <!-- slider --> |
||
602 | <Slider name="DHUD_Slider_Template" inherits="OptionsSliderTemplate" hidden="false" virtual="true"> |
||
603 | <Size><AbsDimension x="135" y="16"/></Size> |
||
604 | <Anchors> |
||
605 | <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="$parent"> |
||
606 | <Offset><AbsDimension x="0" y="0"/></Offset> |
||
607 | </Anchor> |
||
608 | </Anchors> |
||
609 | <Scripts> |
||
610 | <OnLoad> |
||
611 | DHUDO_FrameSlider_OnLoad( 0.1, 1, 0.1 ); |
||
612 | </OnLoad> |
||
613 | <OnShow> |
||
614 | DHUDO_FrameSlider_OnShow( this.setting_name , (DHUDO_locale[this.setting_name] or "") ); |
||
615 | </OnShow> |
||
616 | <OnValueChanged> |
||
617 | DHUDO_FrameSlider_OnValueChanged( this.setting_name, (DHUDO_locale[this.setting_name] or "") ); |
||
618 | </OnValueChanged> |
||
619 | <OnEnter> |
||
620 | GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); |
||
621 | GameTooltip:SetText((DHUDO_locale[this.setting_name.."_tooltip"] or ""), 1, 1, 1, 1); |
||
622 | </OnEnter> |
||
623 | <OnLeave> |
||
624 | GameTooltip:Hide(); |
||
625 | </OnLeave> |
||
626 | </Scripts> |
||
627 | </Slider> |
||
628 | |||
629 | |||
630 | |||
631 | |||
632 | <CheckButton name="DHUD_RadioButtonTemplate" virtual="true"> |
||
633 | <Size> |
||
634 | <AbsDimension x="16" y="16"/> |
||
635 | </Size> |
||
636 | <Layers> |
||
637 | <Layer level="BACKGROUND"> |
||
638 | <FontString name="$parentText" inherits="GameFontNormalSmall"> |
||
639 | <Anchors> |
||
640 | <Anchor point="LEFT" relativePoint="RIGHT"> |
||
641 | <Offset> |
||
642 | <AbsDimension x="5" y="0"/> |
||
643 | </Offset> |
||
644 | </Anchor> |
||
645 | </Anchors> |
||
646 | </FontString> |
||
647 | </Layer> |
||
648 | </Layers> |
||
649 | <NormalTexture file="Interface\Buttons\UI-RadioButton"> |
||
650 | <TexCoords left="0" right="0.25" top="0" bottom="1"/> |
||
651 | </NormalTexture> |
||
652 | <HighlightTexture file="Interface\Buttons\UI-RadioButton" alphaMode="ADD"> |
||
653 | <TexCoords left="0.5" right="0.75" top="0" bottom="1"/> |
||
654 | </HighlightTexture> |
||
655 | <CheckedTexture file="Interface\Buttons\UI-RadioButton"> |
||
656 | <TexCoords left="0.25" right="0.5" top="0" bottom="1"/> |
||
657 | </CheckedTexture> |
||
658 | </CheckButton> |
||
659 | |||
660 | |||
661 | |||
662 | |||
663 | |||
664 | <Frame name="DHUD_Colorbox_Template" virtual="true"> |
||
665 | <Size> |
||
666 | <AbsDimension x="360" y="20"/> |
||
667 | </Size> |
||
668 | <Anchors> |
||
669 | <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT"> |
||
670 | <Offset><AbsDimension x="110" y="-25"/></Offset> |
||
671 | </Anchor> |
||
672 | </Anchors> |
||
673 | |||
674 | <Layers> |
||
675 | <Layer level="BACKGROUND"> |
||
676 | <FontString name="$parentText" inherits="GameFontNormalSmall" justifyH="LEFT" text="Player Health"> |
||
677 | <Size> |
||
678 | <AbsDimension x="150" y="16"/> |
||
679 | </Size> |
||
680 | <Anchors> |
||
681 | <Anchor point="LEFT" relativePoint="LEFT"> |
||
682 | <Offset><AbsDimension x="-100" y="0"/></Offset> |
||
683 | </Anchor> |
||
684 | </Anchors> |
||
685 | </FontString> |
||
686 | </Layer> |
||
687 | </Layers> |
||
688 | |||
689 | <Frames> |
||
690 | |||
691 | <Button name="$parent1"> |
||
692 | <Size> |
||
693 | <AbsDimension x="20" y="20"/> |
||
694 | </Size> |
||
695 | <Anchors> |
||
696 | <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT"> |
||
697 | <Offset><AbsDimension x="0" y="0"/></Offset> |
||
698 | </Anchor> |
||
699 | </Anchors> |
||
700 | <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border"> |
||
701 | <EdgeSize> |
||
702 | <AbsValue val="8"/> |
||
703 | </EdgeSize> |
||
704 | </Backdrop> |
||
705 | <Layers> |
||
706 | <Layer level="ARTWORK"> |
||
707 | <Texture name="$parentTexture"> |
||
708 | <Size><AbsDimension y="15" x="15"/></Size> |
||
709 | <Anchors><Anchor point="CENTER"></Anchor></Anchors> |
||
710 | </Texture> |
||
711 | </Layer> |
||
712 | </Layers> |
||
713 | <Scripts> |
||
714 | <OnClick> |
||
715 | DHUDO_ColorPicker_OnClick(1); |
||
716 | </OnClick> |
||
717 | </Scripts> |
||
718 | <HighlightTexture file="Interface\Buttons\CheckButtonHilight" alphaMode="ADD"></HighlightTexture> |
||
719 | </Button> |
||
720 | |||
721 | <Button name="$parent2"> |
||
722 | <Size> |
||
723 | <AbsDimension x="20" y="20"/> |
||
724 | </Size> |
||
725 | <Anchors> |
||
726 | <Anchor point="TOP" relativeTo="$parent" relativePoint="TOP"> |
||
727 | <Offset><AbsDimension x="0" y="0"/></Offset> |
||
728 | </Anchor> |
||
729 | </Anchors> |
||
730 | <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border"> |
||
731 | <EdgeSize> |
||
732 | <AbsValue val="8"/> |
||
733 | </EdgeSize> |
||
734 | </Backdrop> |
||
735 | <Layers> |
||
736 | <Layer level="ARTWORK"> |
||
737 | <Texture name="$parentTexture"> |
||
738 | <Size><AbsDimension y="15" x="15"/></Size> |
||
739 | <Anchors><Anchor point="CENTER"></Anchor></Anchors> |
||
740 | </Texture> |
||
741 | </Layer> |
||
742 | </Layers> |
||
743 | <Scripts> |
||
744 | <OnClick> |
||
745 | DHUDO_ColorPicker_OnClick(2); |
||
746 | </OnClick> |
||
747 | </Scripts> |
||
748 | <HighlightTexture file="Interface\Buttons\CheckButtonHilight" alphaMode="ADD"></HighlightTexture> |
||
749 | </Button> |
||
750 | |||
751 | <Button name="$parent3"> |
||
752 | <Size> |
||
753 | <AbsDimension x="20" y="20"/> |
||
754 | </Size> |
||
755 | <Anchors> |
||
756 | <Anchor point="TOPRIGHT" relativeTo="$parent" relativePoint="TOPRIGHT"> |
||
757 | <Offset><AbsDimension x="0" y="0"/></Offset> |
||
758 | </Anchor> |
||
759 | </Anchors> |
||
760 | <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border"> |
||
761 | <EdgeSize> |
||
762 | <AbsValue val="8"/> |
||
763 | </EdgeSize> |
||
764 | </Backdrop> |
||
765 | <Layers> |
||
766 | <Layer level="ARTWORK"> |
||
767 | <Texture name="$parentTexture"> |
||
768 | <Size><AbsDimension y="15" x="15"/></Size> |
||
769 | <Anchors><Anchor point="CENTER"></Anchor></Anchors> |
||
770 | </Texture> |
||
771 | </Layer> |
||
772 | </Layers> |
||
773 | <Scripts> |
||
774 | <OnClick> |
||
775 | DHUDO_ColorPicker_OnClick(3); |
||
776 | </OnClick> |
||
777 | </Scripts> |
||
778 | <HighlightTexture file="Interface\Buttons\CheckButtonHilight" alphaMode="ADD"></HighlightTexture> |
||
779 | </Button> |
||
780 | |||
781 | <Frame name="$parentG1"> |
||
782 | <Size> |
||
783 | <AbsDimension x="50" y="10"/> |
||
784 | </Size> |
||
785 | <Anchors> |
||
786 | <Anchor point="LEFT" relativeTo="$parent1" relativePoint="RIGHT"> |
||
787 | <Offset><AbsDimension x="0" y="0"/></Offset> |
||
788 | </Anchor> |
||
789 | <Anchor point="RIGHT" relativeTo="$parent2" relativePoint="LEFT"> |
||
790 | <Offset><AbsDimension x="0" y="0"/></Offset> |
||
791 | </Anchor> |
||
792 | </Anchors> |
||
793 | <Layers> |
||
794 | <Layer level="BACKGROUND"> |
||
795 | <Texture name="$parentTexture" file="Interface\ChatFrame\ChatFrameBackground"/> |
||
796 | </Layer> |
||
797 | </Layers> |
||
798 | </Frame> |
||
799 | |||
800 | <Frame name="$parentG2"> |
||
801 | <Size> |
||
802 | <AbsDimension x="50" y="10"/> |
||
803 | </Size> |
||
804 | <Anchors> |
||
805 | <Anchor point="LEFT" relativeTo="$parent2" relativePoint="RIGHT"> |
||
806 | <Offset><AbsDimension x="0" y="0"/></Offset> |
||
807 | </Anchor> |
||
808 | <Anchor point="RIGHT" relativeTo="$parent3" relativePoint="LEFT"> |
||
809 | <Offset><AbsDimension x="0" y="0"/></Offset> |
||
810 | </Anchor> |
||
811 | </Anchors> |
||
812 | <Layers> |
||
813 | <Layer level="BACKGROUND"> |
||
814 | <Texture name="$parentTexture" file="Interface\ChatFrame\ChatFrameBackground"/> |
||
815 | </Layer> |
||
816 | </Layers> |
||
817 | </Frame> |
||
818 | |||
819 | </Frames> |
||
820 | <Scripts> |
||
821 | <OnLoad> |
||
822 | this.setting_name = string.gsub( this:GetName() , "DHUD_Colorbox_", ""); |
||
823 | getglobal( this:GetName().."Text"):SetText( " "..(DHUDO_locale[this.setting_name] or this.setting_name) ); |
||
824 | </OnLoad> |
||
825 | <OnShow> |
||
826 | DHUDO_changeG(this.setting_name); |
||
827 | </OnShow> |
||
828 | </Scripts> |
||
829 | </Frame> |
||
830 | |||
831 | |||
832 | |||
833 | |||
834 | |||
835 | </UI> |