vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | -- |
2 | -- base unitframe handler |
||
3 | -- |
||
4 | function SelfEliteFrameHandler(unittype) |
||
5 | if( unittype == "elite" ) then |
||
6 | PlayerFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Elite"); |
||
7 | elseif( unittype == "rare" ) then |
||
8 | PlayerFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare"); |
||
9 | elseif( unittype == "raremob" ) then |
||
10 | PlayerFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-RareMob"); |
||
11 | elseif( unittype == "normal" ) then |
||
12 | PlayerFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame"); |
||
13 | else |
||
14 | PlayerFrameTexture:SetTexture(nil); |
||
15 | end |
||
16 | end |
||
17 | |||
18 | function SelfEliteChangeFrameType(checked,value) |
||
19 | if (value == 1) then |
||
20 | SelfEliteFrameHandler("normal"); |
||
21 | elseif (value == 2) then |
||
22 | SelfEliteFrameHandler("rare"); |
||
23 | elseif (value == 3) then |
||
24 | SelfEliteFrameHandler("elite"); |
||
25 | elseif (value == 4) then |
||
26 | SelfEliteFrameHandler("raremob"); |
||
27 | elseif (value == 5) then |
||
28 | SelfEliteFrameHandler(); |
||
29 | end |
||
30 | end |
||
31 | |||
32 | function SelfElite_Onload() |
||
33 | if (UltimateUI_RegisterConfiguration) then |
||
34 | -- Example of Section |
||
35 | -- ======================== |
||
36 | UltimateUI_RegisterConfiguration( |
||
37 | "UUI_SELFELITE", -- prefix that all options that should go in this section have to start with |
||
38 | "SECTION", -- Type |
||
39 | "Self Elite", -- Section Label |
||
40 | "Change your player frame!" -- Mouseover |
||
41 | ); |
||
42 | -- Example of Separator |
||
43 | -- ======================== |
||
44 | UltimateUI_RegisterConfiguration( |
||
45 | "UUI_SELFELITE_SEPARATOR", -- Keyword |
||
46 | "SEPARATOR", -- Type |
||
47 | "SelfElite Options", -- Separator Label |
||
48 | "Options for SelfElite" -- Mouseover |
||
49 | ); |
||
50 | UltimateUI_RegisterConfiguration( |
||
51 | "UUI_SELFELITE_TYPE", -- CVar |
||
52 | "SLIDER", -- Type |
||
53 | "Set your frame type", -- Short description |
||
54 | "This slider sets the frame type you want.", -- Long description |
||
55 | SelfEliteChangeFrameType, -- Callback |
||
56 | 1, -- Default Checked/Unchecked |
||
57 | 1, -- Default slider value |
||
58 | 1, -- Minimum slider value |
||
59 | 5, -- max value |
||
60 | "Frame number type", -- slider "header" text |
||
61 | 1, -- Slider steps |
||
62 | 1, -- Text on slider? |
||
63 | "", -- slider text append |
||
64 | 1 -- slider multiplier |
||
65 | ); |
||
66 | end |
||
67 | end |