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/" |
2 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||
3 | xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\..\FrameXML\UI.xsd"> |
||
4 | <Frame name="StatRingsMana" parent="UIParent" inherits="StatRingsRingTemplate"> |
||
5 | <Anchors> |
||
6 | <Anchor point="TOPLEFT" relativeTo="Moog_HudRight" relativePoint="TOPRIGHT"> |
||
7 | <Offset> |
||
8 | <AbsDimension x="15" y="0"/> |
||
9 | </Offset> |
||
10 | </Anchor> |
||
11 | </Anchors> |
||
12 | <Scripts> |
||
13 | <OnLoad> |
||
14 | StatRings_RegisterRing(this, "Mana"); |
||
15 | StatRingsRingTemplate_OnLoad(); |
||
16 | this:SetReversed(true); |
||
17 | |||
18 | this:SetAlpha(0.1); |
||
19 | |||
20 | this:RegisterEvent("PLAYER_ENTERING_WORLD"); |
||
21 | this:RegisterEvent("UNIT_MANA"); |
||
22 | this:RegisterEvent("UNIT_MAXMANA"); |
||
23 | this:RegisterEvent("UNIT_ENERGY"); |
||
24 | this:RegisterEvent("UNIT_MAXENERGY"); |
||
25 | this:RegisterEvent("UNIT_RAGE"); |
||
26 | this:RegisterEvent("UNIT_MAXRAGE"); |
||
27 | this:RegisterEvent("UNIT_DISPLAYPOWER"); |
||
28 | this:RegisterEvent("PLAYER_LEVEL_UP"); |
||
29 | if (UnitPowerType("player") == 0) then |
||
30 | info = { r = 0.00, g = 0.7, b = 1.00 }; |
||
31 | else |
||
32 | info = ManaBarColor[UnitPowerType("player")]; |
||
33 | end |
||
34 | this:UpdateColor(info); |
||
35 | this:SetMax(UnitManaMax("player")); |
||
36 | this:SetValue(UnitMana("player")); |
||
37 | |||
38 | function this:UpdateAlpha() |
||
39 | if this.startValue < this.maxValue then |
||
40 | StatRingsTest_SetAlpha(self, 0.4); |
||
41 | elseif this.startValue == this.maxValue then |
||
42 | StatRingsTest_SetAlpha(self, 0.1); |
||
43 | end |
||
44 | end |
||
45 | this:AddUpdateFunction(this.UpdateAlpha); |
||
46 | this.dirty = true; |
||
47 | </OnLoad> |
||
48 | <OnEvent> |
||
49 | if (event == "PLAYER_ENTERING_WORLD") then |
||
50 | if (UnitPowerType("player") == 0) then |
||
51 | info = { r = 0.00, g = 0.7, b = 1.00 }; |
||
52 | else |
||
53 | info = ManaBarColor[UnitPowerType("player")]; |
||
54 | end |
||
55 | this:UpdateColor(info); |
||
56 | this:SetMax(UnitManaMax("player")); |
||
57 | this:SetValue(UnitMana("player")); |
||
58 | return; |
||
59 | elseif event == "PLAYER_LEVEL_UP" then |
||
60 | this:SetMax(UnitManaMax("player")); |
||
61 | end |
||
62 | if (arg1 == "player") then |
||
63 | if (event == "UNIT_DISPLAYPOWER") then |
||
64 | if (UnitPowerType("player") == 0) then |
||
65 | info = { r = 0.00, g = 0.7, b = 1.00 }; |
||
66 | else |
||
67 | info = ManaBarColor[UnitPowerType("player")]; |
||
68 | end |
||
69 | this:UpdateColor(info); |
||
70 | this:SetMax(UnitManaMax("player")); |
||
71 | elseif event == "UNIT_MAXMANA" then |
||
72 | this:SetMax(UnitManaMax("player")); |
||
73 | end |
||
74 | this:SetValue(UnitMana("player")); |
||
75 | end |
||
76 | </OnEvent> |
||
77 | </Scripts> |
||
78 | </Frame> |
||
79 | </Ui> |