vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | local MoogMenuArray = { "SelfOn" , "Seperation", "VertPos", "TargetOn", "MobTargetPC", "PlayerTargetPC", "MobClass", "ShowIcons", "BlinkLongCast", "BlinkInstaCast", "SeperateNumbers" }; |
2 | local MoogMenuTipArray = { "Show Player Info Numerically" , "Horizontal Seperation" , "Vertical Positioning", "Show Target Info Numerically", "Show Mob values as % even when real values known", "Show Player values as % even when real values known", "Show Mob Class Icon", "Show Icons (Used as menu anchors)", "Blink the HUD when spells with a cast time complete", "Blink the HUD when instacast spells complete", "Seperate numbers as well as bars" }; |
||
3 | local MoogMenuTextArray = {"Show Self" , "Bar Seperation" , "Vertical Position", "Show Target", "Show Mob values as %", "Show Player values as %", "Show Mob Class", "Show Self/Target Icons", "Blink at end of casting", "Blink when instacasting", "Seperate Numbers"}; |
||
4 | local MoogSliderMin = { 0 , 0 , -100 , 0, 0, 0, 0, 0, 0, 0, 0 }; |
||
5 | local MoogSliderMax = { 0 , 150 , 200 , 0 , 0 , 0, 0, 0, 0, 0, 0 }; |
||
6 | |||
7 | function MoogMenu_Show() |
||
8 | local dyms = MoogHUDInfo[MoogMenuArray[this:GetID()]] |
||
9 | if dyms then |
||
10 | this:SetChecked(1); |
||
11 | else |
||
12 | this:SetChecked(0); |
||
13 | end |
||
14 | dyms = nil; |
||
15 | getglobal(this:GetName().."Text"):SetText(MoogMenuTextArray[this:GetID()]); |
||
16 | end |
||
17 | |||
18 | function MoogMenu_Click() |
||
19 | if this:GetChecked() then |
||
20 | MoogHUDInfo[MoogMenuArray[this:GetID()]] = true; |
||
21 | else |
||
22 | MoogHUDInfo[MoogMenuArray[this:GetID()]] = false; |
||
23 | end |
||
24 | Moog_HudUpdateOptions(); |
||
25 | end |
||
26 | |||
27 | function MoogMenu_Enter() |
||
28 | local msg = MoogMenuTipArray[this:GetID()]; |
||
29 | GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); |
||
30 | GameTooltip:SetBackdropColor(0.0, 0.0, 0.0); |
||
31 | if msg ~= nil then GameTooltip:SetText(msg, 1.0, 1.0, 1.0); end |
||
32 | end |
||
33 | |||
34 | function MoogSliderShow() |
||
35 | local barmin = MoogSliderMin[this:GetID()]; |
||
36 | local barmax = MoogSliderMax[this:GetID()]; |
||
37 | if (barmin and barmax) then |
||
38 | this:SetMinMaxValues(barmin,barmax); |
||
39 | else |
||
40 | this:SetMinMaxValues(0,1); |
||
41 | end |
||
42 | |||
43 | local dyms = MoogHUDInfo[MoogMenuArray[this:GetID()]] |
||
44 | if dyms then |
||
45 | this:SetValue(dyms); |
||
46 | else |
||
47 | this:SetValue(barmin); |
||
48 | end |
||
49 | dyms = nil; |
||
50 | barmin = nil; |
||
51 | barmax = nil; |
||
52 | getglobal(this:GetName().."Text"):SetText(MoogMenuTextArray[this:GetID()]); |
||
53 | end |
||
54 | |||
55 | function MoogSliderOver() |
||
56 | local msg = MoogMenuTipArray[this:GetID()]; |
||
57 | GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); |
||
58 | GameTooltip:SetBackdropColor(0.0, 0.0, 0.0); |
||
59 | if msg ~= nil then GameTooltip:SetText(msg, 1.0, 1.0, 1.0); end |
||
60 | end |
||
61 | |||
62 | function MoogSliderChanged() |
||
63 | MoogHUDInfo[MoogMenuArray[this:GetID()]] = this:GetValue(); |
||
64 | Moog_HudUpdateOptions(); |
||
65 | end |