vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | -- Reposition stuff |
2 | function CT_BottomBar_Enable() |
||
3 | CT_BottomBarFrame:Show(); |
||
4 | CT_BottomBar_Enabled[UnitName("player")] = 1; |
||
5 | -- Bags |
||
6 | MainMenuBarBackpackButton:ClearAllPoints(); |
||
7 | MainMenuBarBackpackButton:SetPoint("TOPRIGHT", "CT_BottomBarFrameBags", "TOPRIGHT", -6, -4); |
||
8 | |||
9 | -- Mini Buttons |
||
10 | CharacterMicroButton:ClearAllPoints(); |
||
11 | CharacterMicroButton:SetPoint("TOPLEFT", "CT_BottomBarFrameMiniButtons", "TOPLEFT", 12, 17); |
||
12 | |||
13 | -- Up & Down buttons |
||
14 | ActionBarUpButton:ClearAllPoints(); |
||
15 | ActionBarDownButton:ClearAllPoints(); |
||
16 | ActionBarUpButton:SetPoint("TOPLEFT", "CT_BottomBarFrameBarUpDown", "TOPLEFT", -6, 4); |
||
17 | ActionBarDownButton:SetPoint("TOPLEFT", "CT_BottomBarFrameBarUpDown", "TOPLEFT", -6, -15); |
||
18 | |||
19 | -- Action bar |
||
20 | ActionButton1:ClearAllPoints(); |
||
21 | ActionButton1:SetPoint("TOPLEFT", "CT_BottomBarFrameBar", "TOPLEFT", 7, -4); |
||
22 | |||
23 | -- Bonus Action Bar |
||
24 | BonusActionButton1:ClearAllPoints(); |
||
25 | BonusActionButton1:SetPoint("TOPLEFT", "CT_BottomBarFrameBar", "TOPLEFT", 7, -4); |
||
26 | |||
27 | -- Latency |
||
28 | MainMenuBarPerformanceBar:ClearAllPoints(); |
||
29 | MainMenuBarPerformanceBar:SetPoint("TOPRIGHT", "MainMenuBarPerformanceBarFrame", "TOPRIGHT", 0, 8) |
||
30 | MainMenuBarPerformanceBarFrame:ClearAllPoints(); |
||
31 | MainMenuBarPerformanceBarFrame:SetHeight(45); |
||
32 | MainMenuBarPerformanceBarFrame:SetPoint("TOPLEFT", "CT_BottomBarFrameLatency", "TOPLEFT", 10, 3); |
||
33 | |||
34 | -- Action Bar Number |
||
35 | MainMenuBarPageNumber:ClearAllPoints(); |
||
36 | MainMenuBarPageNumber:SetPoint("TOPLEFT", "CT_BottomBarFrameBarNumber", "TOPLEFT", 4, -16) |
||
37 | |||
38 | -- Experience Bar |
||
39 | MainMenuExpBar:ClearAllPoints(); |
||
40 | MainMenuExpBar:SetPoint("TOPLEFT", "CT_BottomBarFrameXP", "TOPLEFT", 0, -1); |
||
41 | |||
42 | -- Main bar (Hide it) |
||
43 | MainMenuBar:ClearAllPoints(); |
||
44 | MainMenuBar:SetPoint("TOP", "UIParent", "BOTTOM"); |
||
45 | |||
46 | for k, v in CT_BottomBar_HiddenFrames[UnitName("player")] do |
||
47 | this = getglobal("CT_BottomBarFrame" .. k); |
||
48 | if ( getglobal("CT_BottomBarFrame" .. k).GetScript ) then |
||
49 | getglobal("CT_BottomBarFrame" .. k):GetScript("OnHide")(); |
||
50 | end |
||
51 | getglobal("CT_BottomBarFrame" .. k):Hide(); |
||
52 | end |
||
53 | |||
54 | -- Left Gryphon |
||
55 | CT_BottomBarFrameGryphonsFrameLeft:ClearAllPoints(); |
||
56 | CT_BottomBarFrameGryphonsFrameLeft:SetPoint("BOTTOMRIGHT", "ActionButton1", "BOTTOMLEFT", 25, -5); |
||
57 | |||
58 | -- Right Gryphon |
||
59 | CT_BottomBarFrameGryphonsFrameRight:ClearAllPoints(); |
||
60 | CT_BottomBarFrameGryphonsFrameRight:SetPoint("BOTTOMLEFT", "MainMenuBarBackpackButton", "BOTTOMRIGHT", -26, -2); |
||
61 | |||
62 | if ( CT_BottomBar_RotatedFrames[UnitName("player")]["MiniButtons"] ) then |
||
63 | CT_BottomBar_RotateMiniButtons(1); |
||
64 | end |
||
65 | if ( CT_BottomBar_RotatedFrames[UnitName("player")]["Bars"] ) then |
||
66 | CT_BottomBar_RotateBars(1); |
||
67 | end |
||
68 | if ( CT_BottomBar_RotatedFrames[UnitName("player")]["Bags"] ) then |
||
69 | CT_BottomBar_RotateBags(1); |
||
70 | end |
||
71 | if ( CT_BottomBar_HiddenFrames[UnitName("player")]["Bags"] ) then |
||
72 | MainMenuBarBackpackButton:ClearAllPoints(); |
||
73 | MainMenuBarBackpackButton:SetPoint("TOP", "UIParent", "BOTTOM", 0, -100) |
||
74 | end |
||
75 | CT_BottomBar_HideBars(CT_BottomBar_HiddenFrames[UnitName("player")]["Class"]); |
||
76 | CT_BottomBar_CheckLeftGryphon(); |
||
77 | CT_BottomBar_CheckRightGryphon(); |
||
78 | end |
||
79 | |||
80 | function CT_BottomBar_Disable() |
||
81 | CT_BottomBarFrame:Hide(); |
||
82 | |||
83 | CT_BottomBar_Enabled[UnitName("player")] = nil; |
||
84 | |||
85 | -- Main bar (Show it) |
||
86 | MainMenuBar:ClearAllPoints(); |
||
87 | MainMenuBar:SetPoint("BOTTOM", "UIParent", "BOTTOM"); |
||
88 | |||
89 | -- Bags |
||
90 | MainMenuBarBackpackButton:ClearAllPoints(); |
||
91 | MainMenuBarBackpackButton:SetPoint("BOTTOMRIGHT", "MainMenuBarArtFrame", "BOTTOMRIGHT", -6, 2); |
||
92 | local tbl = { |
||
93 | [0] = "MainMenuBarBackpackButton", |
||
94 | "CharacterBag0Slot", |
||
95 | "CharacterBag1Slot", |
||
96 | "CharacterBag2Slot", |
||
97 | "CharacterBag3Slot" |
||
98 | }; |
||
99 | for i = 1, 4, 1 do |
||
100 | getglobal(tbl[i]):ClearAllPoints(); |
||
101 | getglobal(tbl[i]):SetPoint("RIGHT", tbl[i-1], "LEFT", -5, 0); |
||
102 | end |
||
103 | |||
104 | -- Mini Buttons |
||
105 | CharacterMicroButton:ClearAllPoints(); |
||
106 | CharacterMicroButton:SetPoint("BOTTOMLEFT", "MainMenuBarArtFrame", "BOTTOMLEFT", 552, 2); |
||
107 | |||
108 | -- Up & Down buttons |
||
109 | ActionBarUpButton:ClearAllPoints(); |
||
110 | ActionBarDownButton:ClearAllPoints(); |
||
111 | ActionBarUpButton:SetPoint("CENTER", "MainMenuBarArtFrame", "TOPLEFT", 522, -22); |
||
112 | ActionBarDownButton:SetPoint("CENTER", "MainMenuBarArtFrame", "TOPLEFT", 522, -42); |
||
113 | |||
114 | -- Action bar |
||
115 | ActionButton1:ClearAllPoints(); |
||
116 | ActionButton1:SetPoint("BOTTOMLEFT", "MainMenuBarArtFrame", "BOTTOMLEFT", 8, 4); |
||
117 | |||
118 | -- Bonus Action bar |
||
119 | BonusActionButton1:ClearAllPoints(); |
||
120 | BonusActionButton1:SetPoint("BOTTOMLEFT", "BonusActionBarFrame", "BOTTOMLEFT", 5, 4); |
||
121 | |||
122 | -- Experience Bar |
||
123 | MainMenuExpBar:ClearAllPoints(); |
||
124 | MainMenuExpBar:SetPoint("TOP", "MainMenuBar", "TOP"); |
||
125 | |||
126 | -- Latency |
||
127 | MainMenuBarPerformanceBarFrame:ClearAllPoints(); |
||
128 | MainMenuBarPerformanceBarFrame:SetPoint("BOTTOMRIGHT", "MainMenuExpBar", "BOTTOMRIGHT", -227, -50); |
||
129 | MainMenuBarPerformanceBarFrame:SetHeight(64); |
||
130 | MainMenuBarPerformanceBar:ClearAllPoints(); |
||
131 | MainMenuBarPerformanceBar:SetPoint("TOPRIGHT", "MainMenuBarPerformanceBarFrame", "TOPRIGHT"); |
||
132 | |||
133 | -- Action Bar Number |
||
134 | MainMenuBarPageNumber:ClearAllPoints(); |
||
135 | MainMenuBarPageNumber:SetPoint("CENTER", "MainMenuBarArtFrame", "CENTER", 30, -5) |
||
136 | |||
137 | -- Bonus Action Bar |
||
138 | BonusActionBarFrame:ClearAllPoints(); |
||
139 | BonusActionBarFrame:SetPoint("TOPLEFT", "MainMenuBar", "BOTTOMLEFT", 40, 0); |
||
140 | |||
141 | -- Left Gryphon |
||
142 | MainMenuBarLeftEndCap:ClearAllPoints(); |
||
143 | MainMenuBarLeftEndCap:SetPoint("BOTTOM", "MainMenuBarArtFrame", "BOTTOM", -544, 0); |
||
144 | |||
145 | -- Right Gryphon |
||
146 | MainMenuBarRightEndCap:ClearAllPoints(); |
||
147 | MainMenuBarRightEndCap:SetPoint("BOTTOM", "MainMenuBarArtFrame", "BOTTOM", 544, 0); |
||
148 | |||
149 | -- Shwo or hide pet texture |
||
150 | if ( CT_BottomBar_HiddenFrames[UnitName("player")]["Class"] or CT_BottomBar_HiddenFrames[UnitName("player")]["ClassBackground"] ) then |
||
151 | CT_BottomBar_HideTextures(1); |
||
152 | else |
||
153 | CT_BottomBar_HideTextures(); |
||
154 | end |
||
155 | |||
156 | -- Show stuff that we might be hiding when it's enabled |
||
157 | MainMenuBarBackpackButton:Show(); |
||
158 | CharacterBag0Slot:Show(); |
||
159 | CharacterBag1Slot:Show(); |
||
160 | CharacterBag2Slot:Show(); |
||
161 | CharacterBag3Slot:Show(); |
||
162 | |||
163 | CharacterMicroButton:Show(); |
||
164 | SpellbookMicroButton:Show(); |
||
165 | if ( UnitLevel("player") >= 10 ) then |
||
166 | TalentMicroButton:Show(); |
||
167 | end |
||
168 | QuestLogMicroButton:Show(); |
||
169 | SocialsMicroButton:Show(); |
||
170 | WorldMapMicroButton:Show(); |
||
171 | MainMenuMicroButton:Show(); |
||
172 | HelpMicroButton:Show(); |
||
173 | |||
174 | MainMenuBarPageNumber:Show(); |
||
175 | |||
176 | ActionBarUpButton:Show(); |
||
177 | ActionBarDownButton:Show(); |
||
178 | |||
179 | MainMenuBarPerformanceBarFrame:Show(); |
||
180 | MainMenuBarPerformanceBar:Show(); |
||
181 | |||
182 | MainMenuExpBar:Show(); |
||
183 | |||
184 | for i = 1, 12, 1 do |
||
185 | getglobal("ActionButton" .. i):Show(); |
||
186 | getglobal("BonusActionButton" .. i):Show(); |
||
187 | end |
||
188 | if ( GetBonusBarOffset() > 0 ) then |
||
189 | BonusActionBarFrame.mode = "hide"; |
||
190 | BonusActionBarFrame.state = "bottom"; |
||
191 | ShowBonusActionBar(); |
||
192 | end |
||
193 | for i = 2, 12, 1 do |
||
194 | getglobal("ActionButton" .. i):ClearAllPoints(); |
||
195 | getglobal("ActionButton" .. i):SetPoint("LEFT", "ActionButton" .. i-1, "RIGHT", 6, 0); |
||
196 | getglobal("BonusActionButton" .. i):ClearAllPoints(); |
||
197 | getglobal("BonusActionButton" .. i):SetPoint("LEFT", "BonusActionButton" .. i-1, "RIGHT", 6, 0); |
||
198 | end |
||
199 | tbl = { |
||
200 | [0] = "CharacterMicroButton", |
||
201 | "SpellbookMicroButton", |
||
202 | "TalentMicroButton", |
||
203 | "QuestLogMicroButton", |
||
204 | "SocialsMicroButton", |
||
205 | "WorldMapMicroButton", |
||
206 | "MainMenuMicroButton", |
||
207 | "HelpMicroButton" |
||
208 | }; |
||
209 | for i = 1, 7, 1 do |
||
210 | getglobal(tbl[i]):ClearAllPoints(); |
||
211 | getglobal(tbl[i]):SetPoint("LEFT", tbl[i-1], "RIGHT", -3, 0); |
||
212 | end |
||
213 | |||
214 | if ( CT_BottomBar_HiddenFrames[UnitName("player")]["Class"] ) then |
||
215 | CT_BottomBar_HideBars(1); |
||
216 | else |
||
217 | CT_BottomBar_HideBars(); |
||
218 | end |
||
219 | |||
220 | CT_BottomBar_CheckLeftGryphon(); |
||
221 | CT_BottomBar_CheckRightGryphon(); |
||
222 | |||
223 | end |
||
224 | |||
225 | CT_AddMovable("CT_BottomBarFrameXPDrag", "Experience Bar", "TOPLEFT", "TOPLEFT", "CT_BottomBarFrame", 14, 28, function(status) |
||
226 | if ( status and ( not CT_BottomBar_HiddenFrames[UnitName("player")] or not CT_BottomBar_HiddenFrames[UnitName("player")]["XP"] ) ) then |
||
227 | CT_BottomBarFrameXPDrag:Show() |
||
228 | else |
||
229 | CT_BottomBarFrameXPDrag:Hide(); |
||
230 | end |
||
231 | end); |
||
232 | |||
233 | CT_AddMovable("CT_BottomBarFrameBagsDrag", "Bags Bar", "TOPLEFT", "TOPLEFT", "CT_BottomBarFrame", 823, 18, function(status) |
||
234 | if ( status and ( not CT_BottomBar_HiddenFrames[UnitName("player")] or not CT_BottomBar_HiddenFrames[UnitName("player")]["Bags"] ) ) then |
||
235 | CT_BottomBarFrameBagsDrag:Show() |
||
236 | else |
||
237 | CT_BottomBarFrameBagsDrag:Hide(); |
||
238 | end |
||
239 | end, function() |
||
240 | if ( CT_BottomBar_RotatedFrames[UnitName("player")] and CT_BottomBar_RotatedFrames[UnitName("player")]["Bags"] ) then |
||
241 | CT_BottomBar_RotateBags(); |
||
242 | end |
||
243 | end); |
||
244 | |||
245 | CT_AddMovable("CT_BottomBarFrameMiniButtonsDrag", "Menu Buttons", "TOPLEFT", "TOPLEFT", "CT_BottomBarFrame", 566, 18, function(status) |
||
246 | if ( status and ( not CT_BottomBar_HiddenFrames[UnitName("player")] or not CT_BottomBar_HiddenFrames[UnitName("player")]["MiniButtons"] ) ) then |
||
247 | CT_BottomBarFrameMiniButtonsDrag:Show(); |
||
248 | else |
||
249 | CT_BottomBarFrameMiniButtonsDrag:Hide(); |
||
250 | end |
||
251 | end, function() |
||
252 | if ( CT_BottomBar_RotatedFrames[UnitName("player")] and CT_BottomBar_RotatedFrames[UnitName("player")]["MiniButtons"] ) then |
||
253 | CT_BottomBar_RotateMiniButtons(); |
||
254 | end |
||
255 | end); |
||
256 | |||
257 | CT_AddMovable("CT_BottomBarFrameLatencyDrag", "Latency Meter", "TOPLEFT", "TOPLEFT", "CT_BottomBarFrame", 784, 18, function(status) |
||
258 | if ( status and ( not CT_BottomBar_HiddenFrames[UnitName("player")] or not CT_BottomBar_HiddenFrames[UnitName("player")]["Latency"] ) ) then |
||
259 | CT_BottomBarFrameLatencyDrag:Show() |
||
260 | else |
||
261 | CT_BottomBarFrameLatencyDrag:Hide(); |
||
262 | end |
||
263 | end); |
||
264 | |||
265 | CT_AddMovable("CT_BottomBarFrameBarDrag", "Main Hotbar", "TOPLEFT", "TOPLEFT", "CT_BottomBarFrame", 23, 18, function(status) |
||
266 | if ( status and ( not CT_BottomBar_HiddenFrames[UnitName("player")] or not CT_BottomBar_HiddenFrames[UnitName("player")]["BarHotbar"] ) ) then |
||
267 | CT_BottomBarFrameBarDrag:Show() |
||
268 | else |
||
269 | CT_BottomBarFrameBarDrag:Hide(); |
||
270 | end |
||
271 | end, function() |
||
272 | if ( CT_BottomBar_RotatedFrames[UnitName("player")] and CT_BottomBar_RotatedFrames[UnitName("player")]["Bars"] ) then |
||
273 | CT_BottomBar_RotateBars(); |
||
274 | end |
||
275 | end); |
||
276 | |||
277 | -- Globals |
||
278 | CT_BottomBar_EnableCBs = { }; |
||
279 | CT_BottomBar_HiddenFrames = { }; |
||
280 | CT_BottomBar_Enabled = { }; |
||
281 | CT_BottomBar_RotatedFrames = { }; |
||
282 | |||
283 | tinsert(UISpecialFrames, "CT_BottomBar_OptionsFrame"); |
||
284 | |||
285 | function CT_BottomBar_RotateBags(force) |
||
286 | if ( ( CT_BottomBar_RotatedFrames[UnitName("player")]["Bags"] and not force ) or ( force or 0 ) == -1 ) then |
||
287 | CT_BottomBar_RotatedFrames[UnitName("player")]["Bags"] = nil; |
||
288 | if ( not CT_BottomBar_HiddenFrames[UnitName("player")]["BagsBackground"] ) then |
||
289 | CT_BottomBarFrameBagsBackground:Show(); |
||
290 | else |
||
291 | CT_BottomBarFrameBagsBackground:Hide(); |
||
292 | end |
||
293 | MainMenuBarBackpackButton:ClearAllPoints(); |
||
294 | MainMenuBarBackpackButton:SetPoint("TOPRIGHT", "CT_BottomBarFrameBags", "TOPRIGHT", -8, -4); |
||
295 | local tbl = { |
||
296 | [0] = "MainMenuBarBackpackButton", |
||
297 | "CharacterBag0Slot", |
||
298 | "CharacterBag1Slot", |
||
299 | "CharacterBag2Slot", |
||
300 | "CharacterBag3Slot" |
||
301 | }; |
||
302 | for i = 1, 4, 1 do |
||
303 | getglobal(tbl[i]):ClearAllPoints(); |
||
304 | getglobal(tbl[i]):SetPoint("RIGHT", tbl[i-1], "LEFT", -5, 0); |
||
305 | end |
||
306 | else |
||
307 | CT_BottomBar_RotatedFrames[UnitName("player")]["Bags"] = 1; |
||
308 | CT_BottomBarFrameBagsBackground:Hide(); |
||
309 | MainMenuBarBackpackButton:ClearAllPoints(); |
||
310 | MainMenuBarBackpackButton:SetPoint("TOPLEFT", "CT_BottomBarFrameBags", "TOPLEFT", 7, -4); |
||
311 | local tbl = { |
||
312 | [0] = "MainMenuBarBackpackButton", |
||
313 | "CharacterBag0Slot", |
||
314 | "CharacterBag1Slot", |
||
315 | "CharacterBag2Slot", |
||
316 | "CharacterBag3Slot" |
||
317 | }; |
||
318 | for i = 1, 4, 1 do |
||
319 | getglobal(tbl[i]):ClearAllPoints(); |
||
320 | getglobal(tbl[i]):SetPoint("TOP", tbl[i-1], "BOTTOM", 0, -5); |
||
321 | end |
||
322 | end |
||
323 | if ( CT_BarModOptions_RemoveSpaceBags ) then |
||
324 | CT_BarModOptions_RemoveSpaceBags(CT_BarModOptions_Options[UnitName("player")]["removeBags"]); |
||
325 | end |
||
326 | CT_BottomBar_CheckLeftGryphon(); |
||
327 | CT_BottomBar_CheckRightGryphon(); |
||
328 | end |
||
329 | |||
330 | function CT_BottomBar_RotateBars(force) |
||
331 | if ( CT_BottomBar_RotatedFrames[UnitName("player")]["Bars"] and not force ) then |
||
332 | CT_BottomBar_RotatedFrames[UnitName("player")]["Bars"] = nil; |
||
333 | if ( not CT_BottomBar_HiddenFrames[UnitName("player")]["BarHotbarBackgroundLeft"] ) then |
||
334 | CT_BottomBarFrameBarHotbarBackgroundLeft:Show(); |
||
335 | CT_BottomBarFrameBarHotbarBackgroundRight:Show(); |
||
336 | if ( CT_BarModOptions_Options ) then |
||
337 | for i = 1, 12, 1 do |
||
338 | getglobal("ActionButton" .. i):SetScale(UIParent:GetScale()); |
||
339 | getglobal("BonusActionButton" .. i):SetScale(UIParent:GetScale()); |
||
340 | end |
||
341 | end |
||
342 | end |
||
343 | for i = 2, 12, 1 do |
||
344 | getglobal("ActionButton" .. i):ClearAllPoints(); |
||
345 | getglobal("BonusActionButton" .. i):ClearAllPoints(); |
||
346 | if ( CT_BarModOptions_Options and CT_BarModOptions_Options[UnitName("player")]["removeBars"] and CT_BottomBar_HiddenFrames[UnitName("player")]["BarHotbarBackgroundLeft"] ) then |
||
347 | getglobal("ActionButton" .. i):SetPoint("LEFT", "ActionButton" .. i-1, "RIGHT", 3, 0); |
||
348 | getglobal("BonusActionButton" .. i):SetPoint("LEFT", "BonusActionButton" .. i-1, "RIGHT", 3, 0); |
||
349 | else |
||
350 | getglobal("ActionButton" .. i):SetPoint("LEFT", "ActionButton" .. i-1, "RIGHT", 6, 0); |
||
351 | getglobal("BonusActionButton" .. i):SetPoint("LEFT", "BonusActionButton" .. i-1, "RIGHT", 6, 0); |
||
352 | end |
||
353 | end |
||
354 | else |
||
355 | CT_BottomBar_RotatedFrames[UnitName("player")]["Bars"] = 1; |
||
356 | CT_BottomBarFrameBarHotbarBackgroundLeft:Hide(); |
||
357 | CT_BottomBarFrameBarHotbarBackgroundRight:Hide(); |
||
358 | for i = 2, 12, 1 do |
||
359 | getglobal("ActionButton" .. i):ClearAllPoints(); |
||
360 | getglobal("BonusActionButton" .. i):ClearAllPoints(); |
||
361 | if ( CT_BarModOptions_Options and CT_BarModOptions_Options[UnitName("player")]["removeBars"] ) then |
||
362 | getglobal("ActionButton" .. i):SetPoint("TOP", "ActionButton" .. i-1, "BOTTOM", 0, -3); |
||
363 | getglobal("BonusActionButton" .. i):SetPoint("TOP", "BonusActionButton" .. i-1, "BOTTOM", 0, -3); |
||
364 | else |
||
365 | getglobal("ActionButton" .. i):SetPoint("TOP", "ActionButton" .. i-1, "BOTTOM", 0, -6); |
||
366 | getglobal("BonusActionButton" .. i):SetPoint("TOP", "BonusActionButton" .. i-1, "BOTTOM", 0, -6); |
||
367 | end |
||
368 | end |
||
369 | if ( CT_BarModOptions_Options ) then |
||
370 | for i = 1, 12, 1 do |
||
371 | getglobal("ActionButton" .. i):SetScale(CT_BarModOptions_Options[UnitName("player")][6]*UIParent:GetScale()); |
||
372 | getglobal("BonusActionButton" .. i):SetScale(CT_BarModOptions_Options[UnitName("player")][6]*UIParent:GetScale()); |
||
373 | end |
||
374 | end |
||
375 | end |
||
376 | CT_updateActionButtons(); |
||
377 | CT_BottomBar_CheckLeftGryphon(); |
||
378 | CT_BottomBar_CheckRightGryphon(); |
||
379 | end |
||
380 | |||
381 | CT_BottomBar_oldUpdateTalentButton = UpdateTalentButton; |
||
382 | function CT_BottomBar_newUpdateTalentButton() |
||
383 | CT_BottomBar_oldUpdateTalentButton(); |
||
384 | if ( not CT_BottomBar_Enabled[UnitName("player")] ) then |
||
385 | local tbl = { |
||
386 | [0] = "CharacterMicroButton", |
||
387 | "SpellbookMicroButton", |
||
388 | "TalentMicroButton", |
||
389 | "QuestLogMicroButton", |
||
390 | "SocialsMicroButton", |
||
391 | "WorldMapMicroButton", |
||
392 | "MainMenuMicroButton", |
||
393 | "HelpMicroButton" |
||
394 | }; |
||
395 | |||
396 | for i = 1, 7, 1 do |
||
397 | getglobal(tbl[i]):ClearAllPoints(); |
||
398 | getglobal(tbl[i]):SetPoint("LEFT", tbl[i-1], "RIGHT", -3, 0); |
||
399 | end |
||
400 | else |
||
401 | if ( ( CT_BottomBar_Enabled[UnitName("player")] and CT_BottomBar_HiddenFrames[UnitName("player")]["MiniButtons"] ) or UnitLevel("player") <= 10 ) then |
||
402 | TalentMicroButton:Hide(); |
||
403 | end |
||
404 | if ( CT_BottomBar_RotatedFrames[UnitName("player")]["MiniButtons"] ) then |
||
405 | CT_BottomBar_RotateMiniButtons(1); |
||
406 | else |
||
407 | CT_BottomBar_RotatedFrames[UnitName("player")]["MiniButtons"] = 1; |
||
408 | CT_BottomBar_RotateMiniButtons(); |
||
409 | end |
||
410 | end |
||
411 | end |
||
412 | UpdateTalentButton = CT_BottomBar_newUpdateTalentButton; |
||
413 | |||
414 | function CT_BottomBar_RotateMiniButtons(force) |
||
415 | if ( CT_BottomBar_RotatedFrames[UnitName("player")]["MiniButtons"] and not force ) then |
||
416 | CT_BottomBar_RotatedFrames[UnitName("player")]["MiniButtons"] = nil; |
||
417 | if ( not CT_BottomBar_HiddenFrames[UnitName("player")]["MiniButtonsBackgroundLeft"] ) then |
||
418 | CT_BottomBarFrameMiniButtonsBackgroundLeft:Show(); |
||
419 | CT_BottomBarFrameMiniButtonsBackgroundRight:Show(); |
||
420 | end |
||
421 | local tbl = { |
||
422 | [0] = "CharacterMicroButton", |
||
423 | "SpellbookMicroButton", |
||
424 | "TalentMicroButton", |
||
425 | "QuestLogMicroButton", |
||
426 | "SocialsMicroButton", |
||
427 | "WorldMapMicroButton", |
||
428 | "MainMenuMicroButton", |
||
429 | "HelpMicroButton" |
||
430 | }; |
||
431 | |||
432 | for i = 1, 7, 1 do |
||
433 | getglobal(tbl[i]):ClearAllPoints(); |
||
434 | getglobal(tbl[i]):SetPoint("LEFT", tbl[i-1], "RIGHT", -3, 0); |
||
435 | end |
||
436 | else |
||
437 | CT_BottomBar_RotatedFrames[UnitName("player")]["MiniButtons"] = 1; |
||
438 | CT_BottomBarFrameMiniButtonsBackgroundLeft:Hide(); |
||
439 | CT_BottomBarFrameMiniButtonsBackgroundRight:Hide(); |
||
440 | local tbl = { |
||
441 | [0] = "CharacterMicroButton", |
||
442 | "SpellbookMicroButton", |
||
443 | "TalentMicroButton", |
||
444 | "QuestLogMicroButton", |
||
445 | "SocialsMicroButton", |
||
446 | "WorldMapMicroButton", |
||
447 | "MainMenuMicroButton", |
||
448 | "HelpMicroButton" |
||
449 | }; |
||
450 | |||
451 | for i = 1, 7, 1 do |
||
452 | getglobal(tbl[i]):ClearAllPoints(); |
||
453 | getglobal(tbl[i]):SetPoint("TOP", tbl[i-1], "BOTTOM", 0, 24); |
||
454 | end |
||
455 | end |
||
456 | CT_BottomBar_CheckLeftGryphon(); |
||
457 | CT_BottomBar_CheckRightGryphon(); |
||
458 | end |
||
459 | |||
460 | function CT_BottomBar_OptionsFrame_Hide(...) |
||
461 | for i = 1, arg.n, 1 do |
||
462 | -- Pretty big hack, but meh |
||
463 | local oldThis = this; |
||
464 | if ( this:GetChecked() ) then |
||
465 | CT_BottomBar_HiddenFrames[UnitName("player")][arg[i]] = this:GetName(); |
||
466 | this = getglobal("CT_BottomBarFrame" .. arg[i]); |
||
467 | if ( getglobal("CT_BottomBarFrame" .. arg[i]).GetScript ) then |
||
468 | getglobal("CT_BottomBarFrame" .. arg[i]):GetScript("OnHide")(); |
||
469 | end |
||
470 | getglobal("CT_BottomBarFrame" .. arg[i]):Hide(); |
||
471 | else |
||
472 | CT_BottomBar_HiddenFrames[UnitName("player")][arg[i]] = nil; |
||
473 | this = getglobal("CT_BottomBarFrame" .. arg[i]); |
||
474 | if ( getglobal("CT_BottomBarFrame" .. arg[i]).GetScript ) then |
||
475 | getglobal("CT_BottomBarFrame" .. arg[i]):GetScript("OnShow")(); |
||
476 | end |
||
477 | getglobal("CT_BottomBarFrame" .. arg[i]):Show(); |
||
478 | end |
||
479 | this = oldThis; |
||
480 | if ( arg[i] == "BarHotbarBackgroundLeft" ) then |
||
481 | for i = 1, 12, 1 do |
||
482 | if ( this:GetChecked() and CT_BarModOptions_Options and CT_BarModOptions_Options[UnitName("player")] ) then |
||
483 | getglobal("ActionButton" .. i):SetScale(( CT_BarModOptions_Options[UnitName("player")][6] or 1 )*UIParent:GetScale()); |
||
484 | getglobal("BonusActionButton" .. i):SetScale(( CT_BarModOptions_Options[UnitName("player")][6] or 1)*UIParent:GetScale()); |
||
485 | elseif ( not this:GetChecked() ) then |
||
486 | getglobal("ActionButton" .. i):SetScale(UIParent:GetScale()); |
||
487 | getglobal("BonusActionButton" .. i):SetScale(UIParent:GetScale()); |
||
488 | end |
||
489 | if ( i > 1 and CT_BarModOptions_Options and CT_BarModOptions_Options[UnitName("player")] ) then |
||
490 | getglobal("ActionButton" .. i):ClearAllPoints(); |
||
491 | getglobal("BonusActionButton" .. i):ClearAllPoints(); |
||
492 | local offset = 6; |
||
493 | if ( CT_BarModOptions_Options and CT_BarModOptions_Options[UnitName("player")]["removeBars"] ) then |
||
494 | offset = 3; |
||
495 | end |
||
496 | if ( CT_BottomBar_RotatedFrames and CT_BottomBar_RotatedFrames[UnitName("player")]["Bars"] and CT_BottomBar_Enabled[UnitName("player")] ) then |
||
497 | getglobal("ActionButton" .. i):SetPoint("TOP", "ActionButton" .. i-1, "BOTTOM", 0, -offset); |
||
498 | getglobal("BonusActionButton" .. i):SetPoint("TOP", "BonusActionButton" .. i-1, "BOTTOM", 0, -offset); |
||
499 | elseif ( CT_BottomBar_HiddenFrames and CT_BottomBar_HiddenFrames[UnitName("player")]["BarHotbarBackgroundLeft"] and CT_BottomBar_Enabled[UnitName("player")] ) then |
||
500 | getglobal("ActionButton" .. i):SetPoint("LEFT", "ActionButton" .. i-1, "RIGHT", offset, 0); |
||
501 | getglobal("BonusActionButton" .. i):SetPoint("LEFT", "BonusActionButton" .. i-1, "RIGHT", offset, 0); |
||
502 | else |
||
503 | getglobal("ActionButton" .. i):SetPoint("LEFT", "ActionButton" .. i-1, "RIGHT", 6, 0); |
||
504 | getglobal("BonusActionButton" .. i):SetPoint("LEFT", "BonusActionButton" .. i-1, "RIGHT", 6, 0); |
||
505 | end |
||
506 | end |
||
507 | end |
||
508 | elseif ( arg[i] == "BarHotbarBackgroundRight" ) then |
||
509 | CT_updateActionButtons(); |
||
510 | if ( not this:GetChecked() and CT_BottomBar_RotatedFrames[UnitName("player")]["Bars"] ) then |
||
511 | getglobal("CT_BottomBarFrameBarHotbarBackgroundRight"):Hide(); |
||
512 | getglobal("CT_BottomBarFrameBarHotbarBackgroundLeft"):Hide(); |
||
513 | end |
||
514 | elseif ( arg[i] == "BagsBackground" ) then |
||
515 | if ( not this:GetChecked() and CT_BottomBar_RotatedFrames[UnitName("player")]["Bags"] ) then |
||
516 | getglobal("CT_BottomBarFrame" .. arg[i]):Hide(); |
||
517 | end |
||
518 | if ( CT_BarModOptions_RemoveSpaceBags ) then |
||
519 | CT_BarModOptions_RemoveSpaceBags(CT_BarModOptions_Options[UnitName("player")]["removeBags"]); |
||
520 | end |
||
521 | elseif ( arg[i] == "MiniButtonsBackgroundRight" ) then |
||
522 | if ( not this:GetChecked() and CT_BottomBar_RotatedFrames[UnitName("player")]["MiniButtons"] ) then |
||
523 | getglobal("CT_BottomBarFrameMiniButtonsBackgroundRight"):Hide(); |
||
524 | getglobal("CT_BottomBarFrameMiniButtonsBackgroundLeft"):Hide(); |
||
525 | end |
||
526 | end |
||
527 | end |
||
528 | CT_BottomBar_CheckLeftGryphon(); |
||
529 | CT_BottomBar_CheckRightGryphon(); |
||
530 | end |
||
531 | |||
532 | function CT_BottomBar_OptionsFrame_AddToEnableList() |
||
533 | tinsert(CT_BottomBar_EnableCBs, this:GetName()); |
||
534 | this:Disable(); |
||
535 | getglobal(this:GetName() .. "Text"):SetTextColor(0.3, 0.3, 0.3); |
||
536 | end |
||
537 | |||
538 | function CT_BottomBar_OptionsFrame_EnableMod(enable) |
||
539 | CT_BottomBar_OptionsFrameAllChecked:SetChecked(enable); |
||
540 | for k, v in CT_BottomBar_EnableCBs do |
||
541 | if ( enable ) then |
||
542 | getglobal(v):Enable(); |
||
543 | getglobal(v .. "Text"):SetTextColor(1, 1, 1); |
||
544 | else |
||
545 | getglobal(v):Disable(); |
||
546 | getglobal(v .. "Text"):SetTextColor(0.3, 0.3, 0.3); |
||
547 | end |
||
548 | end |
||
549 | |||
550 | if ( enable ) then |
||
551 | CT_BottomBar_Enable(); |
||
552 | else |
||
553 | CT_BottomBar_Disable(); |
||
554 | end |
||
555 | end |
||
556 | |||
557 | function CT_BottomBar_InitMod() |
||
558 | if ( not CT_BottomBar_HiddenFrames[UnitName("player")] ) then |
||
559 | CT_BottomBar_HiddenFrames[UnitName("player")] = { }; |
||
560 | else |
||
561 | for k, v in CT_BottomBar_HiddenFrames[UnitName("player")] do |
||
562 | getglobal(v):SetChecked(1); |
||
563 | end |
||
564 | end |
||
565 | if ( not CT_BottomBar_RotatedFrames[UnitName("player")] ) then |
||
566 | CT_BottomBar_RotatedFrames[UnitName("player")] = { }; |
||
567 | end |
||
568 | |||
569 | if ( not CT_BottomBar_RotatedFrames[UnitName("player")] ) then |
||
570 | CT_BottomBar_RotatedFrames[UnitName("player")] = { }; |
||
571 | else |
||
572 | if ( CT_BottomBar_RotatedFrames[UnitName("player")]["MiniButtons"] ) then |
||
573 | CT_BottomBar_RotateMiniButtons(1); |
||
574 | end |
||
575 | if ( CT_BottomBar_RotatedFrames[UnitName("player")]["Bars"] ) then |
||
576 | CT_BottomBar_RotateBars(1); |
||
577 | end |
||
578 | if ( CT_BottomBar_RotatedFrames[UnitName("player")]["Bags"] ) then |
||
579 | CT_BottomBar_RotateBags(1); |
||
580 | end |
||
581 | end |
||
582 | CT_BottomBar_OptionsFrame_EnableMod(CT_BottomBar_Enabled[UnitName("player")]); |
||
583 | end |
||
584 | function CT_BottomBar_DisplayWindow() |
||
585 | if ( CT_BottomBar_OptionsFrame:IsVisible() ) then |
||
586 | HideUIPanel(CT_BottomBar_OptionsFrame); |
||
587 | else |
||
588 | ShowUIPanel(CT_BottomBar_OptionsFrame); |
||
589 | end |
||
590 | end |
||
591 | |||
592 | SlashCmdList["BOTTOMBAR"] = CT_BottomBar_DisplayWindow; |
||
593 | SLASH_BOTTOMBAR1 = "/bottombar"; |
||
594 | SLASH_BOTTOMBAR2 = "/bb"; |
||
595 | CT_RegisterMod("Breakable Bottom Bar", "Open Options", 2, "Interface\\Icons\\Ability_Warrior_Sunder", "Displays the Breakable Bottom Bar options window.", "switch", "", CT_BottomBar_DisplayWindow); |
||
596 | |||
597 | function CT_BottomBar_CheckRightGryphon() |
||
598 | if ( CT_BottomBar_HiddenFrames[UnitName("player")]["GryphonsFrameRight"] ) then |
||
599 | CT_BottomBarFrameGryphonsFrameRight:Hide(); |
||
600 | MainMenuBarRightEndCap:Hide(); |
||
601 | else |
||
602 | CT_BottomBarFrameGryphonsFrameRight:Show(); |
||
603 | if ( CT_BottomBar_Enabled[UnitName("player")] ) then |
||
604 | MainMenuBarRightEndCap:Hide(); |
||
605 | else |
||
606 | MainMenuBarRightEndCap:Show(); |
||
607 | end |
||
608 | end |
||
609 | end |
||
610 | |||
611 | function CT_BottomBar_CheckLeftGryphon() |
||
612 | if ( CT_BottomBar_HiddenFrames[UnitName("player")]["GryphonsFrameLeft"] ) then |
||
613 | CT_BottomBarFrameGryphonsFrameLeft:Hide(); |
||
614 | MainMenuBarLeftEndCap:Hide(); |
||
615 | else |
||
616 | CT_BottomBarFrameGryphonsFrameLeft:Show(); |
||
617 | if ( CT_BottomBar_Enabled[UnitName("player")] ) then |
||
618 | MainMenuBarLeftEndCap:Hide(); |
||
619 | else |
||
620 | MainMenuBarLeftEndCap:Show(); |
||
621 | end |
||
622 | end |
||
623 | end |
||
624 | |||
625 | -- Hide pet/shapeshift/stance texture |
||
626 | |||
627 | CT_oldPetActionBar_UpdatePosition = PetActionBar_UpdatePosition; |
||
628 | function CT_newPetActionBar_UpdatePosition() |
||
629 | CT_oldPetActionBar_UpdatePosition(); |
||
630 | CT_LinkFrameDrag(PetActionButton1, CT_PetBar_Drag, "TOPLEFT", "BOTTOMRIGHT", 2, 2); |
||
631 | if ( CT_BottomBar_HiddenFrames[UnitName("player")]["Class"] or CT_BottomBar_HiddenFrames[UnitName("player")]["ClassBackground"] ) then |
||
632 | CT_BottomBar_HideTextures(1); |
||
633 | else |
||
634 | CT_BottomBar_HideTextures(); |
||
635 | end |
||
636 | end |
||
637 | PetActionBar_UpdatePosition = CT_newPetActionBar_UpdatePosition; |
||
638 | |||
639 | CT_BarMod_HidePetBarTextures = 1; |
||
640 | |||
641 | function CT_BottomBar_HideTextures(hide) |
||
642 | if ( hide ) then |
||
643 | ShapeshiftBarLeft:ClearAllPoints(); |
||
644 | SlidingActionBarTexture0:ClearAllPoints(); |
||
645 | ShapeshiftBarLeft:SetPoint("TOPRIGHT", "UIParent", "TOPLEFT", -500, 0); |
||
646 | SlidingActionBarTexture0:SetPoint("TOPRIGHT", "UIParent", "TOPLEFT", -500, 0); -- Hide |
||
647 | else |
||
648 | SlidingActionBarTexture0:ClearAllPoints(); |
||
649 | if ( CT_PetBar_DragFrame_Orientation == "H" ) then |
||
650 | SlidingActionBarTexture0:SetPoint("BOTTOMLEFT", "PetActionButton1", "BOTTOMLEFT", -36, -3); |
||
651 | else |
||
652 | SlidingActionBarTexture0:SetPoint("TOPRIGHT", "UIParent", "TOPLEFT", -500, 0); -- Hide |
||
653 | end |
||
654 | ShapeshiftBarLeft:ClearAllPoints(); |
||
655 | if ( CT_BABar_DragFrame_Orientation == "H" ) then |
||
656 | ShapeshiftBarLeft:SetPoint("BOTTOMLEFT", "ShapeshiftButton1", "BOTTOMLEFT", -14, -4); |
||
657 | else |
||
658 | ShapeshiftBarLeft:SetPoint("TOPRIGHT", "UIParent", "TOPLEFT", -500, 0); |
||
659 | end |
||
660 | end |
||
661 | end |
||
662 | |||
663 | CT_BottomBar_oldShapeshiftBar_Update = ShapeshiftBar_Update; |
||
664 | function CT_BottomBar_newShapeshiftBar_Update(hide) |
||
665 | if ( hide ) then |
||
666 | ShapeshiftBarFrame:Hide(); |
||
667 | CT_BABar_Drag:Hide(); |
||
668 | else |
||
669 | CT_BottomBar_oldShapeshiftBar_Update(); |
||
670 | end |
||
671 | end |
||
672 | ShapeshiftBar_Update = CT_BottomBar_newShapeshiftBar_Update; |
||
673 | |||
674 | CT_BottomBar_oldShapeshiftBar_UpdatePosition = ShapeshiftBar_UpdatePosition; |
||
675 | function CT_BottomBar_newShapeshiftBar_UpdatePosition() |
||
676 | if ( CT_BottomBar_Enabled[UnitName("player")] ) then |
||
677 | BonusActionButton1:ClearAllPoints(); |
||
678 | BonusActionButton1:SetPoint("TOPLEFT", "CT_BottomBarFrameBar", "TOPLEFT", 7, -4); |
||
679 | CT_BarModOptions_RemoveSpaceSpecial(CT_BarModOptions_Options[UnitName("player")]["removeSpecial"]); |
||
680 | end |
||
681 | if ( CT_BottomBar_HiddenFrames[UnitName("player")] and CT_BottomBar_HiddenFrames[UnitName("player")]["Class"] ) then |
||
682 | CT_BottomBar_HideTextures(1); |
||
683 | if ( CT_BottomBar_HiddenFrames[UnitName("player")]["Class"] ) then |
||
684 | CT_BABar_Drag:Hide(); |
||
685 | ShapeshiftBarFrame:Hide(); |
||
686 | CT_PetBar_Drag:Hide(); |
||
687 | PetActionBarFrame:Hide(); |
||
688 | end |
||
689 | else |
||
690 | if ( not CT_BottomBar_HiddenFrames[UnitName("player")] or not CT_BottomBar_HiddenFrames[UnitName("player")]["ClassBackground"] ) then |
||
691 | CT_BottomBar_HideTextures(nil); |
||
692 | else |
||
693 | CT_BottomBar_HideTextures(1); |
||
694 | end |
||
695 | if ( CT_BottomBar_HiddenFrames[UnitName("player")]["Class"] ) then |
||
696 | CT_BABar_Drag:Show(); |
||
697 | ShapeshiftBarFrame:Show(); |
||
698 | CT_PetBar_Drag:Show(); |
||
699 | PetActionBarFrame:Show(); |
||
700 | end |
||
701 | end |
||
702 | end |
||
703 | ShapeshiftBar_UpdatePosition = CT_BottomBar_newShapeshiftBar_UpdatePosition; |
||
704 | |||
705 | function CT_BottomBar_HideBars(hide) |
||
706 | if ( hide ) then |
||
707 | CT_BABar_Drag:Hide(); |
||
708 | ShapeshiftBarFrame:Hide(); |
||
709 | CT_PetBar_Drag:Hide(); |
||
710 | PetActionBarFrame:Hide(); |
||
711 | else |
||
712 | ShapeshiftBar_Update(); |
||
713 | if ( ShapeshiftBarFrame:IsVisible() and CT_MF_ShowFrames ) then |
||
714 | CT_BABar_Drag:Show(); |
||
715 | else |
||
716 | CT_BABar_Drag:Hide(); |
||
717 | end |
||
718 | if ( PetHasActionBar() ) then |
||
719 | PetActionBarFrame:Show(); |
||
720 | if ( CT_MF_ShowFrames ) then |
||
721 | CT_PetBar_Drag:Show(); |
||
722 | else |
||
723 | CT_PetBar_Drag:Hide(); |
||
724 | end |
||
725 | else |
||
726 | CT_PetBar_Drag:Hide(); |
||
727 | end |
||
728 | end |
||
729 | end |
||
730 | |||
731 | CT_BottomBar_oldPetActionBar_Update = PetActionBar_Update; |
||
732 | function CT_BottomBar_newPetActionBar_Update() |
||
733 | CT_BottomBar_oldPetActionBar_Update(); |
||
734 | if ( CT_BottomBar_HiddenFrames[UnitName("player")]["Class"] or CT_BottomBar_HiddenFrames[UnitName("player")]["ClassBackground"] ) then |
||
735 | CT_BottomBar_HideTextures(1); |
||
736 | else |
||
737 | CT_BottomBar_HideTextures(); |
||
738 | end |
||
739 | CT_BottomBar_HideBars(CT_BottomBar_HiddenFrames[UnitName("player")]["Class"]); |
||
740 | end |
||
741 | PetActionBar_Update = CT_BottomBar_newPetActionBar_Update; |
||
742 | |||
743 | CT_BottomBar_oldShowPetActionBar = ShowPetActionBar; |
||
744 | function CT_BottomBar_newShowPetActionBar() |
||
745 | CT_BottomBar_oldShowPetActionBar(); |
||
746 | if ( CT_BottomBar_HiddenFrames[UnitName("player")]["Class"] or CT_BottomBar_HiddenFrames[UnitName("player")]["ClassBackground"] ) then |
||
747 | CT_BottomBar_HideTextures(1); |
||
748 | else |
||
749 | CT_BottomBar_HideTextures(); |
||
750 | end |
||
751 | CT_BottomBar_HideBars(CT_BottomBar_HiddenFrames[UnitName("player")]["Class"]); |
||
752 | end |
||
753 | ShowPetActionBar = CT_BottomBar_newShowPetActionBar; |
||
754 | |||
755 | CT_BottomBar_oldActionButton_Update = ActionButton_Update; |
||
756 | function CT_BottomBar_newActionButton_Update() |
||
757 | CT_BottomBar_oldActionButton_Update(); |
||
758 | if ( CT_BottomBar_Enabled[UnitName("player")] and CT_BottomBar_HiddenFrames[UnitName("player")]["BarHotbar"] )then |
||
759 | this:Hide(); |
||
760 | end |
||
761 | end |
||
762 | ActionButton_Update = CT_BottomBar_newActionButton_Update; |
||
763 | |||
764 | CT_BottomBar_oldReputationWatchBar_Update = ReputationWatchBar_Update; |
||
765 | function CT_BottomBar_newReputationWatchBar_Update(newLevel) |
||
766 | if ( not CT_BottomBarFrameXP:IsShown() ) then |
||
767 | ReputationWatchBar:Hide(); |
||
768 | return; |
||
769 | elseif ( not newLevel ) then |
||
770 | newLevel = UnitLevel("player"); |
||
771 | end |
||
772 | CT_BottomBar_oldReputationWatchBar_Update(newLevel); |
||
773 | ReputationWatchBar:ClearAllPoints(); |
||
774 | if ( newLevel < MAX_PLAYER_LEVEL ) then |
||
775 | -- Display it above the main menu bar. |
||
776 | ReputationWatchBar:SetPoint("TOP", "MainMenuExpBar", "TOP", 0, 10); |
||
777 | else |
||
778 | if ( ReputationWatchBar:IsShown() ) then |
||
779 | CT_BottomBarFrameXPTextureFrame:Hide(); |
||
780 | else |
||
781 | CT_BottomBarFrameXPTextureFrame:Show(); |
||
782 | end |
||
783 | -- Display it on top of the main menu bar. |
||
784 | ReputationWatchBar:SetPoint("TOP", "MainMenuExpBar", "TOP", 0, -1); |
||
785 | end |
||
786 | end |
||
787 | ReputationWatchBar_Update = CT_BottomBar_newReputationWatchBar_Update; |