vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
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 <Script file="BuffWatchOptions.lua"/>
5  
6 <Frame name="BW_Options" toplevel="true" frameStrata="DIALOG" movable="true" enableMouse="true" hidden="true" parent="UIParent" enableKeyboard="true">
7  
8 <Size>
9 <AbsDimension x="350" y="580"/>
10 </Size>
11  
12 <Anchors>
13 <Anchor point="CENTER"/>
14 </Anchors>
15  
16 <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
17 <BackgroundInsets>
18 <AbsInset left="11" right="12" top="12" bottom="11"/>
19 </BackgroundInsets>
20 <TileSize>
21 <AbsValue val="32"/>
22 </TileSize>
23 <EdgeSize>
24 <AbsValue val="32"/>
25 </EdgeSize>
26 </Backdrop>
27  
28 <Layers>
29  
30 <Layer level="ARTWORK">
31  
32 <Texture name="$parent_Header" file="Interface\DialogFrame\UI-DialogBox-Header">
33 <Size>
34 <AbsDimension x="350" y="64"/>
35 </Size>
36 <Anchors>
37 <Anchor point="TOP">
38 <Offset>
39 <AbsDimension x="0" y="12"/>
40 </Offset>
41 </Anchor>
42 </Anchors>
43 </Texture>
44  
45 <FontString inherits="GameFontNormal" text="BuffWatch Options">
46 <Anchors>
47 <Anchor point="TOP" relativeTo="BW_Options_Header">
48 <Offset>
49 <AbsDimension x="0" y="-14"/>
50 </Offset>
51 </Anchor>
52 </Anchors>
53 </FontString>
54  
55 <FontString name="$parent_SortOrderLabel" inherits="GameFontNormalSmall" text="Sort Order">
56 <Anchors>
57 <Anchor point="TOPLEFT">
58 <Offset>
59 <AbsDimension x="45" y="-50" />
60 </Offset>
61 </Anchor>
62 </Anchors>
63 </FontString>
64  
65 </Layer>
66  
67 </Layers>
68  
69 <Frames>
70  
71 <Button name="$parent_BWToggle" inherits="OptionsButtonTemplate" text="Toggle">
72 <Size>
73 <AbsDimension x="60" y="20"/>
74 </Size>
75 <Anchors>
76 <Anchor point="TOPLEFT">
77 <Offset>
78 <AbsDimension x="275" y="-20"/>
79 </Offset>
80 </Anchor>
81 </Anchors>
82 <Scripts>
83 <OnClick>
84 if BW:IsVisible() then
85 BW:Hide()
86 else
87 BW:Show()
88 end
89 </OnClick>
90 </Scripts>
91 </Button>
92  
93 <Frame name="$parent_SortOrder" inherits="UIDropDownMenuTemplate" enableMouse="true">
94 <Anchors>
95 <Anchor point="LEFT" relativeTo="$parent_SortOrderLabel" relativePoint="RIGHT">
96 <Offset>
97 <AbsDimension x="-10" y="-2" />
98 </Offset>
99 </Anchor>
100 </Anchors>
101 <Scripts>
102 <OnLoad>
103 BW_Options_SortOrder_OnLoad()
104 </OnLoad>
105 <OnShow>
106 BW_Options_SortOrder_OnLoad()
107 </OnShow>
108 <OnEnter>
109 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
110 GameTooltip:SetText(BW_TTIP_SORTORDER)
111 </OnEnter>
112 <OnLeave>
113 GameTooltip:Hide()
114 </OnLeave>
115 </Scripts>
116 </Frame>
117  
118 <CheckButton name="$parent_ShowOnStartup" inherits="OptionsCheckButtonTemplate">
119 <Anchors>
120 <Anchor point="TOPLEFT" relativeTo="$parent_SortOrderLabel" relativePoint="BOTTOMLEFT">
121 <Offset>
122 <AbsDimension x="-5" y="-10"/>
123 </Offset>
124 </Anchor>
125 </Anchors>
126 <Scripts>
127 <OnLoad>
128 getglobal(this:GetName().."Text"):SetText("Show on startup");
129 </OnLoad>
130 <OnClick>
131 if (this:GetChecked()) then
132 BuffWatchConfig.show_on_startup = true
133 else
134 BuffWatchConfig.show_on_startup = false
135 end
136 </OnClick>
137 <OnEnter>
138 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
139 GameTooltip:SetText(BW_TTIP_SHOWONSTARTUP)
140 </OnEnter>
141 <OnLeave>
142 GameTooltip:Hide()
143 </OnLeave>
144 </Scripts>
145 </CheckButton>
146  
147 <CheckButton name="$parent_ShowPets" inherits="OptionsCheckButtonTemplate">
148 <Anchors>
149 <Anchor point="TOPLEFT" relativeTo="$parent_ShowOnStartup" relativePoint="BOTTOMLEFT">
150 <Offset>
151 <AbsDimension x="0" y="0"/>
152 </Offset>
153 </Anchor>
154 </Anchors>
155 <Scripts>
156 <OnLoad>
157 getglobal(this:GetName().."Text"):SetText("Show Pets");
158 </OnLoad>
159 <OnClick>
160 if (this:GetChecked()) then
161 BuffWatchConfig.ShowPets = true
162 else
163 BuffWatchConfig.ShowPets = false
164 end
165 BW_Set_UNIT_IDs(true)
166 BW_GetAllBuffs()
167 BW_UpdateBuffStatus()
168 BW_ResizeWindow()
169 </OnClick>
170 <OnEnter>
171 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
172 GameTooltip:SetText(BW_TTIP_SHOWPETS)
173 </OnEnter>
174 <OnLeave>
175 GameTooltip:Hide()
176 </OnLeave>
177 </Scripts>
178 </CheckButton>
179  
180 <CheckButton name="$parent_ShowOnlyCastableBuffs" inherits="OptionsCheckButtonTemplate">
181 <Anchors>
182 <Anchor point="TOPLEFT" relativeTo="$parent_ShowPets" relativePoint="BOTTOMLEFT">
183 <Offset>
184 <AbsDimension x="0" y="0"/>
185 </Offset>
186 </Anchor>
187 </Anchors>
188 <Scripts>
189 <OnLoad>
190 getglobal(this:GetName().."Text"):SetText("Show Only Castable Buffs");
191 </OnLoad>
192 <OnClick>
193 if (this:GetChecked()) then
194 BuffWatchConfig.ShowCastableBuffs = true
195 else
196 BuffWatchConfig.ShowCastableBuffs = false
197 end
198 BW_GetAllBuffs()
199 BW_UpdateBuffStatus()
200 BW_ResizeWindow()
201 </OnClick>
202 <OnEnter>
203 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
204 GameTooltip:SetText(BW_TTIP_SHOWCASTABLEBUFFS)
205 </OnEnter>
206 <OnLeave>
207 GameTooltip:Hide()
208 </OnLeave>
209 </Scripts>
210 </CheckButton>
211  
212 <CheckButton name="$parent_ShowDebuffs" inherits="OptionsCheckButtonTemplate">
213 <Anchors>
214 <Anchor point="TOPLEFT" relativeTo="$parent_ShowOnlyCastableBuffs" relativePoint="BOTTOMLEFT">
215 <Offset>
216 <AbsDimension x="0" y="0"/>
217 </Offset>
218 </Anchor>
219 </Anchors>
220 <Scripts>
221 <OnLoad>
222 getglobal(this:GetName().."Text"):SetText("Show Debuffs");
223 </OnLoad>
224 <OnClick>
225 if (this:GetChecked()) then
226 BuffWatchConfig.ShowDebuffs = true
227 OptionsFrame_EnableCheckBox(BW_Options_ShowOnlyDispellDebuffs, BW_Options_ShowOnlyDispellDebuffs:GetChecked())
228 OptionsFrame_EnableCheckBox(BW_Options_DebuffsAlwaysVisible, BW_Options_DebuffsAlwaysVisible:GetChecked())
229 else
230 BuffWatchConfig.ShowDebuffs = false
231 OptionsFrame_DisableCheckBox(BW_Options_ShowOnlyDispellDebuffs)
232 OptionsFrame_DisableCheckBox(BW_Options_DebuffsAlwaysVisible)
233 end
234 BW_GetAllBuffs()
235 BW_UpdateBuffStatus()
236 BW_ResizeWindow()
237 </OnClick>
238 <OnEnter>
239 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
240 GameTooltip:SetText(BW_TTIP_SHOWDEBUFFS)
241 </OnEnter>
242 <OnLeave>
243 GameTooltip:Hide()
244 </OnLeave>
245 </Scripts>
246 </CheckButton>
247  
248 <CheckButton name="$parent_ShowOnlyDispellDebuffs" inherits="OptionsCheckButtonTemplate">
249 <Size>
250 <AbsDimension x="20" y="20"/>
251 </Size>
252 <Anchors>
253 <Anchor point="TOPLEFT" relativeTo="$parent_ShowDebuffs" relativePoint="BOTTOMLEFT">
254 <Offset>
255 <AbsDimension x="10" y="0"/>
256 </Offset>
257 </Anchor>
258 </Anchors>
259 <Scripts>
260 <OnLoad>
261 getglobal(this:GetName().."Text"):SetText("Show Only Dispellable Debuffs");
262 </OnLoad>
263 <OnClick>
264 if (this:GetChecked()) then
265 BuffWatchConfig.ShowDispellableDebuffs = true
266 else
267 BuffWatchConfig.ShowDispellableDebuffs = false
268 end
269 BW_GetAllBuffs()
270 BW_UpdateBuffStatus()
271 BW_ResizeWindow()
272 </OnClick>
273 <OnEnter>
274 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
275 GameTooltip:SetText(BW_TTIP_SHOWDISPELLDEBUFFS)
276 </OnEnter>
277 <OnLeave>
278 GameTooltip:Hide()
279 </OnLeave>
280 </Scripts>
281 </CheckButton>
282  
283 <CheckButton name="$parent_DebuffsAlwaysVisible" inherits="OptionsCheckButtonTemplate">
284 <Size>
285 <AbsDimension x="20" y="20"/>
286 </Size>
287 <Anchors>
288 <Anchor point="TOPLEFT" relativeTo="$parent_ShowOnlyDispellDebuffs" relativePoint="BOTTOMLEFT">
289 <Offset>
290 <AbsDimension x="0" y="0"/>
291 </Offset>
292 </Anchor>
293 </Anchors>
294 <Scripts>
295 <OnLoad>
296 getglobal(this:GetName().."Text"):SetText("Debuffs Always Visible");
297 </OnLoad>
298 <OnClick>
299 if (this:GetChecked()) then
300 BuffWatchConfig.DebuffsAlwaysVisible = true
301 else
302 BuffWatchConfig.DebuffsAlwaysVisible = false
303 end
304  
305 BW_UpdateBuffStatus()
306 BW_ResizeWindow()
307 </OnClick>
308 <OnEnter>
309 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
310 GameTooltip:SetText(BW_TTIP_DEBUFFSALWAYSVISIBLE)
311 </OnEnter>
312 <OnLeave>
313 GameTooltip:Hide()
314 </OnLeave>
315 </Scripts>
316 </CheckButton>
317  
318 <CheckButton name="$parent_AlignBuffs" inherits="OptionsCheckButtonTemplate">
319 <Anchors>
320 <Anchor point="TOPLEFT" relativeTo="$parent_DebuffsAlwaysVisible" relativePoint="BOTTOMLEFT">
321 <Offset>
322 <AbsDimension x="-10" y="0"/>
323 </Offset>
324 </Anchor>
325 </Anchors>
326 <Scripts>
327 <OnLoad>
328 getglobal(this:GetName().."Text"):SetText("Align Buffs");
329 </OnLoad>
330 <OnClick>
331 if (this:GetChecked()) then
332 BuffWatchConfig.AlignBuffs = true
333 else
334 BuffWatchConfig.AlignBuffs = false
335 end
336 BW_GetAllBuffs()
337 BW_UpdateBuffStatus()
338 BW_ResizeWindow()
339 </OnClick>
340 <OnEnter>
341 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
342 GameTooltip:SetText(BW_TTIP_ALIGNBUFFS)
343 </OnEnter>
344 <OnLeave>
345 GameTooltip:Hide()
346 </OnLeave>
347 </Scripts>
348 </CheckButton>
349  
350 <CheckButton name="$parent_ShowExpiredWarning" inherits="OptionsCheckButtonTemplate">
351 <Anchors>
352 <Anchor point="TOPLEFT" relativeTo="$parent_AlignBuffs" relativePoint="BOTTOMLEFT">
353 <Offset>
354 <AbsDimension x="0" y="0"/>
355 </Offset>
356 </Anchor>
357 </Anchors>
358 <Scripts>
359 <OnLoad>
360 getglobal(this:GetName().."Text"):SetText("Show Expired Warning");
361 </OnLoad>
362 <OnClick>
363 if (this:GetChecked()) then
364 BuffWatchConfig.ExpiredWarning = true
365 else
366 BuffWatchConfig.ExpiredWarning = false
367 end
368 </OnClick>
369 <OnEnter>
370 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
371 GameTooltip:SetText(BW_TTIP_SHOWEXPIREDWARNING)
372 </OnEnter>
373 <OnLeave>
374 GameTooltip:Hide()
375 </OnLeave>
376 </Scripts>
377 </CheckButton>
378  
379 <CheckButton name="$parent_PlayExpiredSound" inherits="OptionsCheckButtonTemplate">
380 <Anchors>
381 <Anchor point="TOPLEFT" relativeTo="$parent_ShowExpiredWarning" relativePoint="BOTTOMLEFT">
382 <Offset>
383 <AbsDimension x="0" y="0"/>
384 </Offset>
385 </Anchor>
386 </Anchors>
387 <Scripts>
388 <OnLoad>
389 getglobal(this:GetName().."Text"):SetText("Play Expired Sound");
390 </OnLoad>
391 <OnClick>
392 if (this:GetChecked()) then
393 BuffWatchConfig.ExpiredSound = true
394 else
395 BuffWatchConfig.ExpiredSound = false
396 end
397 </OnClick>
398 <OnEnter>
399 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
400 GameTooltip:SetText(BW_TTIP_PLAYEXPIREDSOUND)
401 </OnEnter>
402 <OnLeave>
403 GameTooltip:Hide()
404 </OnLeave>
405 </Scripts>
406 </CheckButton>
407  
408 <CheckButton name="$parent_HighlightPvP" inherits="OptionsCheckButtonTemplate">
409 <Anchors>
410 <Anchor point="TOPLEFT" relativeTo="$parent_PlayExpiredSound" relativePoint="BOTTOMLEFT">
411 <Offset>
412 <AbsDimension x="0" y="0"/>
413 </Offset>
414 </Anchor>
415 </Anchors>
416 <Scripts>
417 <OnLoad>
418 getglobal(this:GetName().."Text"):SetText("Highlight PvP Flagged");
419 </OnLoad>
420 <OnClick>
421 if (this:GetChecked()) then
422 BuffWatchConfig.HighlightPvP = true
423 else
424 BuffWatchConfig.HighlightPvP = false
425 end
426 BW_Options_HighlightPvP_Clicked()
427 </OnClick>
428 <OnEnter>
429 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
430 GameTooltip:SetText(BW_TTIP_HIGHLIGHTPVP)
431 </OnEnter>
432 <OnLeave>
433 GameTooltip:Hide()
434 </OnLeave>
435 </Scripts>
436 </CheckButton>
437  
438 <CheckButton name="$parent_PreventPvPBuff" inherits="OptionsCheckButtonTemplate">
439 <Anchors>
440 <Anchor point="TOPLEFT" relativeTo="$parent_HighlightPvP" relativePoint="BOTTOMLEFT">
441 <Offset>
442 <AbsDimension x="0" y="0"/>
443 </Offset>
444 </Anchor>
445 </Anchors>
446 <Scripts>
447 <OnLoad>
448 getglobal(this:GetName().."Text"):SetText("Prevent PvP Buffing");
449 </OnLoad>
450 <OnClick>
451 if (this:GetChecked()) then
452 BuffWatchConfig.PreventPvPBuff = true
453 else
454 BuffWatchConfig.PreventPvPBuff = false
455 end
456 </OnClick>
457 <OnEnter>
458 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
459 GameTooltip:SetText(BW_TTIP_PREVENTPVPBUFF)
460 </OnEnter>
461 <OnLeave>
462 GameTooltip:Hide()
463 </OnLeave>
464 </Scripts>
465 </CheckButton>
466  
467 <Slider name="$parent_BuffThreshold" inherits="OptionsSliderTemplate">
468 <Size>
469 <AbsDimension x="220" y="16"/>
470 </Size>
471 <Anchors>
472 <Anchor point="TOPLEFT" relativeTo="$parent_PreventPvPBuff" relativePoint="BOTTOMLEFT">
473 <Offset>
474 <AbsDimension x="25" y="-20" />
475 </Offset>
476 </Anchor>
477 </Anchors>
478 <Scripts>
479 <OnLoad>
480 getglobal(this:GetName().."Text"):SetText("GroupBuff Threshold (" .. this:GetValue() .. ")")
481 getglobal(this:GetName().."High"):SetText("5+")
482 getglobal(this:GetName().."Low"):SetText("0 (off)")
483 this:SetMinMaxValues(0, 5)
484 this:SetValueStep(1)
485 </OnLoad>
486 <OnValueChanged>
487 BuffWatchConfig.BuffThreshold = this:GetValue()
488 getglobal(this:GetName().."Text"):SetText("GroupBuff Threshold (" .. this:GetValue() .. ")")
489 </OnValueChanged>
490 <OnEnter>
491 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
492 GameTooltip:SetText(BW_TTIP_BUFFTHRESHOLD)
493 </OnEnter>
494 <OnLeave>
495 GameTooltip:Hide()
496 </OnLeave>
497 </Scripts>
498 </Slider>
499  
500  
501 <Slider name="$parent_Alpha" inherits="OptionsSliderTemplate">
502 <Size>
503 <AbsDimension x="220" y="16"/>
504 </Size>
505 <Anchors>
506 <Anchor point="TOPLEFT" relativeTo="$parent_BuffThreshold" relativePoint="BOTTOMLEFT">
507 <Offset>
508 <AbsDimension x="0" y="-20" />
509 </Offset>
510 </Anchor>
511 </Anchors>
512 <Scripts>
513 <OnLoad>
514 getglobal(this:GetName().."Text"):SetText("Transparency")
515 getglobal(this:GetName().."High"):SetText()
516 getglobal(this:GetName().."Low"):SetText()
517 this:SetMinMaxValues(0.0,1.0)
518 this:SetValueStep(0.01)
519 </OnLoad>
520 <OnValueChanged>
521 BuffWatchConfig.alpha = this:GetValue()
522 BW_Background:SetAlpha( BuffWatchConfig.alpha )
523 </OnValueChanged>
524 <OnEnter>
525 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
526 GameTooltip:SetText(BW_TTIP_ALPHA)
527 </OnEnter>
528 <OnLeave>
529 GameTooltip:Hide()
530 </OnLeave>
531 </Scripts>
532 </Slider>
533  
534 <Slider name="$parent_UpdPerSec" inherits="OptionsSliderTemplate">
535 <Size>
536 <AbsDimension x="220" y="16"/>
537 </Size>
538 <Anchors>
539 <Anchor point="TOPLEFT" relativeTo="$parent_Alpha" relativePoint="BOTTOMLEFT">
540 <Offset>
541 <AbsDimension x="0" y="-20" />
542 </Offset>
543 </Anchor>
544 </Anchors>
545 <Scripts>
546 <OnLoad>
547 getglobal(this:GetName().."Text"):SetText("Max Updates Per Second (" .. this:GetValue() .. ")")
548 getglobal(this:GetName().."High"):SetText("10")
549 getglobal(this:GetName().."Low"):SetText("0 (off)")
550 this:SetMinMaxValues(0, 10)
551 this:SetValueStep(1)
552 </OnLoad>
553 <OnValueChanged>
554 BuffWatchConfig.UpdPerSec = this:GetValue()
555 getglobal(this:GetName().."Text"):SetText("Max Updates Per Second (" .. this:GetValue() .. ")")
556 </OnValueChanged>
557 <OnEnter>
558 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
559 GameTooltip:SetText(BW_TTIP_UPDPERSEC)
560 </OnEnter>
561 <OnLeave>
562 GameTooltip:Hide()
563 </OnLeave>
564 </Scripts>
565 </Slider>
566  
567 <CheckButton name="$parent_ShowUpdPerSec" inherits="OptionsCheckButtonTemplate">
568 <Size>
569 <AbsDimension x="20" y="20"/>
570 </Size>
571 <Anchors>
572 <Anchor point="TOPLEFT" relativeTo="$parent_UpdPerSec" relativePoint="BOTTOMLEFT">
573 <Offset>
574 <AbsDimension x="50" y="-5"/>
575 </Offset>
576 </Anchor>
577 </Anchors>
578 <Scripts>
579 <OnLoad>
580 getglobal(this:GetName().."Text"):SetText("Show UPS Counter");
581 </OnLoad>
582 <OnClick>
583 if (this:GetChecked()) then
584 BuffWatchConfig.ShowUpdPerSec = true
585 BW_UPS:Show()
586 else
587 BuffWatchConfig.ShowUpdPerSec = false
588 BW_UPS:Hide()
589 end
590 BW_ResizeWindow()
591 </OnClick>
592 <OnEnter>
593 GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
594 GameTooltip:SetText(BW_TTIP_SHOWUPDPERSEC)
595 </OnEnter>
596 <OnLeave>
597 GameTooltip:Hide()
598 </OnLeave>
599 </Scripts>
600 </CheckButton>
601  
602 <Button name="$parent_Okay" inherits="OptionsButtonTemplate" text="Okay">
603 <Anchors>
604 <Anchor point="BOTTOMRIGHT">
605 <Offset>
606 <AbsDimension x="-12" y="16"/>
607 </Offset>
608 </Anchor>
609 </Anchors>
610 <Scripts>
611 <OnClick>
612 PlaySound("gsTitleOptionOK")
613 HideUIPanel(BW_Options)
614 </OnClick>
615 </Scripts>
616 </Button>
617  
618 </Frames>
619  
620 <Scripts>
621 <OnLoad>
622 BW_Options_OnLoad()
623 </OnLoad>
624 </Scripts>
625  
626 </Frame>
627  
628 </Ui>