vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 BT2Dreamlayout = Bartender:NewModule("dreamlayout")
2  
3 local _G = getfenv(0)
4  
5 function BT2Dreamlayout:OnEnable()
6 BT2DL = true
7 self:CreateLayout()
8 self:ScheduleRepeatingEvent(self.BGCheck, 0.1, self)
9 Bartender:Print("Dreamlayout enabled")
10 end
11  
12 function BT2Dreamlayout:CreateLayout()
13 for i=1,12 do
14 Bartender:CreateFrame("B1B"..i)
15 Bartender:CreateFrame("B2B"..i)
16 Bartender:CreateFrame("B3B"..i)
17 Bartender:CreateFrame("B4B"..i)
18 Bartender:CreateFrame("B5B"..i)
19  
20 _G["B1B"..i]:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 1, edgeFile = "", edgeSize = 0, insets = {left = 0, right = 0, top = 0, bottom = 0},}) _G["B1B"..i]:SetBackdropColor(0,0,0,0.6) _G["B1B"..i]:SetBackdropBorderColor(0.5, 0.5, 0, 0) _G["B1B"..i]:SetPoint("TOPLEFT", "Bar1Button"..i, "TOPLEFT", -0.5, 0) _G["B1B"..i]:SetPoint("BOTTOMRIGHT", "Bar1Button"..i, "BOTTOMRIGHT", 0.5, -0)
21 _G["B1B"..i]:SetParent("Bar1")
22 _G["B1B"..i]:SetFrameLevel(1)
23
24 _G["B2B"..i]:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 1, edgeFile = "", edgeSize = 0, insets = {left = 0, right = 0, top = 0, bottom = 0},}) _G["B2B"..i]:SetBackdropColor(0,0,0,0.6) _G["B2B"..i]:SetBackdropBorderColor(0.5, 0.5, 0, 0) _G["B2B"..i]:SetPoint("TOPLEFT", "Bar2Button"..i, "TOPLEFT", -0.5, 0) _G["B2B"..i]:SetPoint("BOTTOMRIGHT", "Bar2Button"..i, "BOTTOMRIGHT", 0.5, -0)
25 _G["B2B"..i]:SetParent("Bar2")
26 _G["B2B"..i]:SetFrameLevel(1)
27  
28 _G["B3B"..i]:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 1, edgeFile = "", edgeSize = 0, insets = {left = 0, right = 0, top = 0, bottom = 0},}) _G["B3B"..i]:SetBackdropColor(0,0,0,0.6) _G["B3B"..i]:SetBackdropBorderColor(0.5, 0.5, 0, 0) _G["B3B"..i]:SetPoint("TOPLEFT", "Bar3Button"..i, "TOPLEFT", -0.5, 0) _G["B3B"..i]:SetPoint("BOTTOMRIGHT", "Bar3Button"..i, "BOTTOMRIGHT", 0.5, -0)
29 _G["B3B"..i]:SetParent("Bar3")
30 _G["B3B"..i]:SetFrameLevel(1)
31
32 _G["B4B"..i]:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 1, edgeFile = "", edgeSize = 0, insets = {left = 0, right = 0, top = 0, bottom = 0},}) _G["B4B"..i]:SetBackdropColor(0,0,0,0.6) _G["B4B"..i]:SetBackdropBorderColor(0.5, 0.5, 0, 0) _G["B4B"..i]:SetPoint("TOPLEFT", "Bar4Button"..i, "TOPLEFT", -0.5, 0) _G["B4B"..i]:SetPoint("BOTTOMRIGHT", "Bar4Button"..i, "BOTTOMRIGHT", 0.5, -0)
33 _G["B4B"..i]:SetParent("Bar4")
34 _G["B4B"..i]:SetFrameLevel(1)
35  
36 _G["B5B"..i]:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 1, edgeFile = "", edgeSize = 0, insets = {left = 0, right = 0, top = 0, bottom = 0},}) _G["B5B"..i]:SetBackdropColor(0,0,0,0.6) _G["B5B"..i]:SetBackdropBorderColor(0.5, 0.5, 0, 0) _G["B5B"..i]:SetPoint("TOPLEFT", "Bar5Button"..i, "TOPLEFT", -0.5, 0) _G["B5B"..i]:SetPoint("BOTTOMRIGHT", "Bar5Button"..i, "BOTTOMRIGHT", 0.5, -0)
37 _G["B5B"..i]:SetParent("Bar5")
38 _G["B5B"..i]:SetFrameLevel(1)
39
40 _G["Bar1Button"..i.."Icon"]:ClearAllPoints() _G["Bar1Button"..i.."Icon"]:SetPoint("TOPLEFT", "B1B"..i, "TOPLEFT", 3, -3) _G["Bar1Button"..i.."Icon"]:SetPoint("BOTTOMRIGHT", "B1B"..i, "BOTTOMRIGHT", -3, 3)
41
42 _G["Bar2Button"..i.."Icon"]:ClearAllPoints() _G["Bar2Button"..i.."Icon"]:SetPoint("TOPLEFT", "B2B"..i, "TOPLEFT", 3, -3) _G["Bar2Button"..i.."Icon"]:SetPoint("BOTTOMRIGHT", "B2B"..i, "BOTTOMRIGHT", -3, 3)
43  
44 _G["Bar3Button"..i.."Icon"]:ClearAllPoints() _G["Bar3Button"..i.."Icon"]:SetPoint("TOPLEFT", "B3B"..i, "TOPLEFT", 3, -3) _G["Bar3Button"..i.."Icon"]:SetPoint("BOTTOMRIGHT", "B3B"..i, "BOTTOMRIGHT", -3, 3)
45
46 _G["Bar4Button"..i.."Icon"]:ClearAllPoints() _G["Bar4Button"..i.."Icon"]:SetPoint("TOPLEFT", "B4B"..i, "TOPLEFT", 3, -3) _G["Bar4Button"..i.."Icon"]:SetPoint("BOTTOMRIGHT", "B4B"..i, "BOTTOMRIGHT", -3, 3)
47
48 _G["Bar5Button"..i.."Icon"]:ClearAllPoints() _G["Bar5Button"..i.."Icon"]:SetPoint("TOPLEFT", "B5B"..i, "TOPLEFT", 3, -3) _G["Bar5Button"..i.."Icon"]:SetPoint("BOTTOMRIGHT", "B5B"..i, "BOTTOMRIGHT", -3, 3)
49
50 end
51  
52 for i=1,10 do
53 Bartender:CreateFrame("B6B"..i)
54 Bartender:CreateFrame("B7B"..i)
55
56 _G["B6B"..i]:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 1, edgeFile = "", edgeSize = 0, insets = {left = 0, right = 0, top = 0, bottom = 0},}) _G["B6B"..i]:SetBackdropColor(0,0,0,0.6) _G["B6B"..i]:SetBackdropBorderColor(0.5, 0.5, 0, 0) _G["B6B"..i]:SetPoint("TOPLEFT", "Bar6Button"..i, "TOPLEFT", -0.5, 0) _G["B6B"..i]:SetPoint("BOTTOMRIGHT", "Bar6Button"..i, "BOTTOMRIGHT", 0.5, -0)
57 _G["B6B"..i]:SetParent("Bar6")
58 _G["B6B"..i]:SetFrameLevel(1)
59  
60 _G["B7B"..i]:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 1, edgeFile = "", edgeSize = 0, insets = {left = 0, right = 0, top = 0, bottom = 0},}) _G["B7B"..i]:SetBackdropColor(0,0,0,0.6) _G["B7B"..i]:SetBackdropBorderColor(0.5, 0.5, 0, 0) _G["B7B"..i]:SetPoint("TOPLEFT", "Bar7Button"..i, "TOPLEFT", -0.5, 0) _G["B7B"..i]:SetPoint("BOTTOMRIGHT", "Bar7Button"..i, "BOTTOMRIGHT", 0.5, -0)
61 _G["B7B"..i]:SetParent("Bar7")
62 _G["B7B"..i]:SetFrameLevel(1)
63  
64 _G["Bar6Button"..i.."Icon"]:ClearAllPoints() _G["Bar6Button"..i.."Icon"]:SetPoint("TOPLEFT", "B6B"..i, "TOPLEFT", 3, -3) _G["Bar6Button"..i.."Icon"]:SetPoint("BOTTOMRIGHT", "B6B"..i, "BOTTOMRIGHT", -3, 3)
65
66 _G["Bar7Button"..i.."Icon"]:ClearAllPoints() _G["Bar7Button"..i.."Icon"]:SetPoint("TOPLEFT", "B7B"..i, "TOPLEFT", 3, -3) _G["Bar7Button"..i.."Icon"]:SetPoint("BOTTOMRIGHT", "B7B"..i, "BOTTOMRIGHT", -3, 3)
67  
68
69 for i=1,5 do
70 Bartender:CreateFrame("B8B"..i)
71  
72 _G["B8B"..i]:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 1, edgeFile = "", edgeSize = 0, insets = {left = 0, right = 0, top = 0, bottom = 0},})
73 _G["B8B"..i]:SetBackdropColor(0,0,0,0.6)
74 _G["B8B"..i]:SetBackdropBorderColor(0.5, 0.5, 0, 0)
75  
76 _G["B8B"..i]:SetPoint("BOTTOMRIGHT", "Bar8Button"..i, "BOTTOMRIGHT", 0.5, -0)
77 _G["B8B"..i]:SetParent("Bar8")
78 _G["B8B"..i]:SetFrameLevel(1)
79  
80 _G["Bar8Button"..i.."Icon"]:ClearAllPoints()
81  
82 _G["Bar8Button"..i.."Icon"]:SetPoint("BOTTOMRIGHT", "B8B"..i, "BOTTOMRIGHT", -3, 3)
83 end
84 end
85  
86 function BT2Dreamlayout:BGCheck()
87 for i=1,12 do local buttons1 = _G["Bar1Button"..i] local buttons2 = _G["Bar2Button"..i] local buttons3 = _G["Bar3Button"..i] local buttons4 = _G["Bar4Button"..i] local buttons5 = _G["Bar5Button"..i] local background1 = _G["B1B"..i] local background2 = _G["B2B"..i] local background3 = _G["B3B"..i] local background4 = _G["B4B"..i] local background5 = _G["B5B"..i] if ( not HasAction(ActionButton_GetPagedID(buttons1)) ) then background1:Hide()
88 else
89 background1:Show()
90 end if ( not HasAction(ActionButton_GetPagedID(buttons2)) ) then background2:Hide()
91 else
92 background2:Show()
93  
94 else
95 background3:Show()
96 end if ( not HasAction(ActionButton_GetPagedID(buttons4)) ) then background4:Hide()
97 else
98 background4:Show()
99 end if ( not HasAction(ActionButton_GetPagedID(buttons5)) ) then background5:Hide()
100 else
101  
102 end end
103
104 amountofshapes = GetNumShapeshiftForms()
105  
106 local background6 = getglobal("B6B"..i)
107 background6:Show()
108 end
109 emptyshape = amountofshapes + 1
110  
111 local background6 = getglobal("B6B"..i)
112 background6:Hide()
113  
114
115 for i = 1, 10 do
116 if (GetPetActionInfo(i)) then
117 local background7 = getglobal("B7B"..i)
118 background7:Show()
119 elseif (not GetPetActionInfo(i)) then
120 local background7 = getglobal("B7B"..i)
121  
122 end
123 end
124 Bartender:HideNormalTexture()
125 end
126
127