My favorites | Sign in
Project Logo
          
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653

-- roth 2009

---------------------------------------------------
-- VARIABLES
---------------------------------------------------

-- define most of the variables
local myname, _ = UnitName("player")
local _, myclass = UnitClass("player")
local button_system, testmode
local shapeshift_on_mouseover, petbar_on_mouseover, rightbars_on_mouseover, micromenu_on_mouseover
local bags_on_mouseover, bar3_on_mouseover, bar2_on_mouseover, bar1_on_mouseover
local move_micro, move_bags, move_rightbars, move_shapeshift, move_bar1, move_bar2, move_bar3
local lock_micro, lock_bags, lock_rightbars, lock_shapeshift, lock_bar1, lock_bar2, lock_bar3
local bar1scale, bar2scale, bar3scale, bar45scale, petscale, shapeshiftscale, micromenuscale, bagscale

---------------------------------------------------
-- CONFIG START
---------------------------------------------------

--this will activate ALL the backdrops. makes it easier to see the dragable bar areas
testmode = 0

-- bar1 and bar2 in 2x6 instead of 1x12
-- 0 = 1x12
-- 1 = 2x6
if myname == "Rothar" or myname == "Loral" or myname == "Grombur" then
button_system = 1
else
button_system = 0
end

-- bar settings
-- you can make a bar visible on mouseover, make it movable or lock it from moving
-- if you make it not movable it will use the default position values of the holder frames

-- bar1
bar1_on_mouseover = 0
move_bar1 = 0
lock_bar1 = 1

-- bar2
bar2_on_mouseover = 0
move_bar2 = 0
lock_bar2 = 1

-- bar3
if myname == "Rothar" then
bar3_on_mouseover = 0
else
bar3_on_mouseover = 0
end
move_bar3 = 0
lock_bar3 = 1

-- rightbars (bar45)
rightbars_on_mouseover = 1
move_rightbars = 0
lock_rightbars = 1

-- shapeshift
if myname == "Loral" then
shapeshift_on_mouseover = 0
elseif myname == "Rothar" then
shapeshift_on_mouseover = 1
else
shapeshift_on_mouseover = 0
end
move_shapeshift = 1
lock_shapeshift = 0
if myname == "Rothar" then
hide_shapeshift = 1
else
hide_shapeshift = 0
end

-- petbar
petbar_on_mouseover = 0
move_pet = 1
lock_pet = 0
hide_pet = 0

-- micromenu
micromenu_on_mouseover = 1
move_micro = 1
lock_micro = 1
hide_micro = 0

-- bags
bags_on_mouseover = 1
move_bags = 1
lock_bags = 1
hide_bags = 0

-- vehicle exit button
move_veb = 1
lock_veb = 0

-- scale values
bar1scale = 0.82*0.75
bar2scale = 0.82*0.75
bar3scale = 0.82*0.75
bar45scale = 0.82*0.75
petscale = 0.65
shapeshiftscale = 0.65
micromenuscale = 0.8
bagscale = 0.9

-- position table for the default frame holder positions
-- those are use if the bar is set to not movable or if there is no value in the layout-cache.txt for that frame yet
local frame_positions = {
[1] = { a = "BOTTOM", x = -127, y = 19 }, --fbar1_button_system_1
[2] = { a = "BOTTOM", x = 0, y = 19 }, --fbar1_button_system_0
[3] = { a = "BOTTOM", x = 125, y = 19 }, --fbar2_button_system_1
[4] = { a = "BOTTOM", x = 0, y = 60 }, --fbar2_button_system_0
[5] = { a = "BOTTOM", x = 0, y = 112 }, --fbar3
[6] = { a = "RIGHT", x = -5, y = 0 }, --fbar45
[7] = { a = "BOTTOMRIGHT", x = 5, y = -5 }, --bags
[8] = { a = "TOP", x = 0, y = 5 }, --micromenu
[9] = { a = "BOTTOM", x = 0, y = 170 }, --petbar
[10] = { a = "BOTTOM", x = 0, y = 240 }, --shapeshift
[11] = { a = "BOTTOM", x = 120, y = 120 }, --my own vehicle exit button
}

---------------------------------------------------
-- CONFIG END
---------------------------------------------------

-- Only edit stuff below if you _know_ what you are doing.

---------------------------------------------------
-- CREATE ALL THE HOLDER FRAMES
---------------------------------------------------

-- Frame to hold the ActionBar1 and the BonusActionBar
local fbar1 = CreateFrame("Frame","rABS_Bar1Holder",UIParent)
if button_system == 1 then
fbar1:SetWidth(264)
fbar1:SetHeight(116)
fbar1:SetPoint(frame_positions[1].a,frame_positions[1].x,frame_positions[1].y)
else
fbar1:SetWidth(518)
fbar1:SetHeight(58)
fbar1:SetPoint(frame_positions[2].a,frame_positions[2].x,frame_positions[2].y)
end
if testmode == 1 then
fbar1:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }});
end
--fbar1:SetFrameStrata("LOW")
fbar1:Show()

-- Frame to hold the MultibarLeft
local fbar2 = CreateFrame("Frame","rABS_Bar2Holder",UIParent)
if button_system == 1 then
fbar2:SetWidth(264)
fbar2:SetHeight(116)
fbar2:SetPoint(frame_positions[3].a,frame_positions[3].x,frame_positions[3].y)
else
fbar2:SetWidth(518)
fbar2:SetHeight(58)
fbar2:SetPoint(frame_positions[4].a,frame_positions[4].x,frame_positions[4].y)
end
if testmode == 1 then
fbar2:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }});
end
fbar2:Show()

-- Frame to hold the MultibarRight
local fbar3 = CreateFrame("Frame","rABS_Bar3Holder",UIParent)
fbar3:SetWidth(518)
fbar3:SetHeight(58)
if testmode == 1 then
fbar3:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }});
end
fbar3:SetPoint(frame_positions[5].a,frame_positions[5].x,frame_positions[5].y)
fbar3:Show()

-- Frame to hold the right bars
local fbar45 = CreateFrame("Frame","rABS_Bar45Holder",UIParent)
fbar45:SetWidth(100) -- size the width here
fbar45:SetHeight(518) -- size the height here
if testmode == 1 then
fbar45:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }});
end
fbar45:SetPoint(frame_positions[6].a,frame_positions[6].x,frame_positions[6].y)

-- Frame to hold the bag buttons
local fbag = CreateFrame("Frame","rABS_BagHolder",UIParent)
fbag:SetWidth(220)
fbag:SetHeight(60)
if testmode == 1 then
fbag:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }});
end
fbag:SetPoint(frame_positions[7].a,frame_positions[7].x,frame_positions[7].y)
fbag:Show()

-- Frame to hold the micro menu
local fmicro = CreateFrame("Frame","rABS_MicroMenuHolder",UIParent)
fmicro:SetWidth(263)
fmicro:SetHeight(60)
if testmode == 1 then
fmicro:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }});
end
fmicro:SetPoint(frame_positions[8].a,frame_positions[8].x,frame_positions[8].y)
fmicro:Show()

-- Frame to hold the pet bars
local fpet = CreateFrame("Frame","rABS_PetBarHolder",UIParent)
fpet:SetWidth(400) -- size the width here
fpet:SetHeight(53) -- size the height here
if testmode == 1 then
fpet:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }});
end
fpet:SetPoint(frame_positions[9].a,frame_positions[9].x,frame_positions[9].y)

-- Frame to hold the shapeshift bars
local fshift = CreateFrame("Frame","rABS_ShapeShiftHolder",UIParent)
fshift:SetWidth(355) -- size the width here
fshift:SetHeight(50) -- size the height here
if testmode == 1 then
fshift:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }});
end
fshift:SetPoint(frame_positions[10].a,frame_positions[10].x,frame_positions[10].y)


---------------------------------------------------
-- CREATE MY OWN VEHICLE EXIT BUTTON
---------------------------------------------------

local fveb = CreateFrame("Frame","rABS_VEBHolder",UIParent)
fveb:SetWidth(70) -- size the width here
fveb:SetHeight(70) -- size the height here
if testmode == 1 then
fveb:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }});
end
fveb:SetPoint(frame_positions[11].a,frame_positions[11].x,frame_positions[11].y)

local veb = CreateFrame("BUTTON", "rABS_VehicleExitButton", fveb, "SecureActionButtonTemplate");
veb:SetWidth(50)
veb:SetHeight(50)
veb:SetPoint("CENTER",0,0)
veb:RegisterForClicks("AnyUp")
veb:SetNormalTexture("Interface\\Vehicles\\UI-Vehicles-Button-Exit-Up")
veb:SetPushedTexture("Interface\\Vehicles\\UI-Vehicles-Button-Exit-Down")
veb:SetHighlightTexture("Interface\\Vehicles\\UI-Vehicles-Button-Exit-Down")
veb:SetScript("OnClick", function(self) VehicleExit() end)
veb:RegisterEvent("UNIT_ENTERING_VEHICLE")
veb:RegisterEvent("UNIT_ENTERED_VEHICLE")
veb:RegisterEvent("UNIT_EXITING_VEHICLE")
veb:RegisterEvent("UNIT_EXITED_VEHICLE")
veb:SetScript("OnEvent", function(self,event,...)
local arg1 = ...;
if(((event=="UNIT_ENTERING_VEHICLE") or (event=="UNIT_ENTERED_VEHICLE")) and arg1 == "player") then
veb:SetAlpha(1)
elseif(((event=="UNIT_EXITING_VEHICLE") or (event=="UNIT_EXITED_VEHICLE")) and arg1 == "player") then
veb:SetAlpha(0)
end
end)
veb:SetAlpha(0)

---------------------------------------------------
-- MOVE STUFF INTO POSITION
---------------------------------------------------

local i,f

--bar1
for i=1, 12 do
_G["ActionButton"..i]:SetParent(fbar1);
end
ActionButton1:ClearAllPoints()
ActionButton1:SetPoint("BOTTOMLEFT",fbar1,"BOTTOMLEFT",10,10);

--bonus bar
BonusActionBarFrame:SetParent(fbar1)
BonusActionBarFrame:SetWidth(0.01)
BonusActionBarTexture0:Hide()
BonusActionBarTexture1:Hide()
BonusActionButton1:ClearAllPoints()
BonusActionButton1:SetPoint("BOTTOMLEFT", fbar1, "BOTTOMLEFT", 10, 10);

--bar2
MultiBarBottomLeft:SetParent(fbar2)
MultiBarBottomLeftButton1:ClearAllPoints()
MultiBarBottomLeftButton1:SetPoint("BOTTOMLEFT", fbar2, "BOTTOMLEFT", 10, 10);

--bar3
MultiBarBottomRight:SetParent(fbar3)
MultiBarBottomRightButton1:ClearAllPoints()
MultiBarBottomRightButton1:SetPoint("BOTTOMLEFT", fbar3, "BOTTOMLEFT", 10, 10);

if button_system == 1 then
ActionButton7:ClearAllPoints()
ActionButton7:SetPoint("BOTTOMLEFT",ActionButton1,"TOPLEFT",0,5);
BonusActionButton7:ClearAllPoints()
BonusActionButton7:SetPoint("BOTTOMLEFT",BonusActionButton1,"TOPLEFT",0,5);
MultiBarBottomLeftButton7:ClearAllPoints()
MultiBarBottomLeftButton7:SetPoint("BOTTOMLEFT",MultiBarBottomLeftButton1,"TOPLEFT",0,5);
end

--bags
local BagButtons = {
MainMenuBarBackpackButton,
CharacterBag0Slot,
CharacterBag1Slot,
CharacterBag2Slot,
CharacterBag3Slot,
KeyRingButton,
}
local function rABS_MoveBagButtons()
for _, f in pairs(BagButtons) do
f:SetParent(fbag);
end
MainMenuBarBackpackButton:ClearAllPoints();
MainMenuBarBackpackButton:SetPoint("BOTTOMRIGHT", -15, 15);
end
rABS_MoveBagButtons();

--mircro menu
local MicroButtons = {
CharacterMicroButton,
SpellbookMicroButton,
TalentMicroButton,
AchievementMicroButton,
QuestLogMicroButton,
SocialsMicroButton,
PVPMicroButton,
LFGMicroButton,
MainMenuMicroButton,
HelpMicroButton,
}
local function rABS_MoveMicroButtons(skinName)
for _, f in pairs(MicroButtons) do
f:SetParent(fmicro);
end
CharacterMicroButton:ClearAllPoints();
CharacterMicroButton:SetPoint("BOTTOMLEFT", 5, 5);
SocialsMicroButton:ClearAllPoints();
SocialsMicroButton:SetPoint("LEFT", QuestLogMicroButton, "RIGHT", -3, 0);
--UpdateTalentButton();
end
hooksecurefunc("VehicleMenuBar_MoveMicroButtons", rABS_MoveMicroButtons);
rABS_MoveMicroButtons();

--shift
ShapeshiftBarFrame:SetParent(fshift)
ShapeshiftBarFrame:SetWidth(0.01)
ShapeshiftButton1:ClearAllPoints()
ShapeshiftButton1:SetPoint("BOTTOMLEFT",fshift,"BOTTOMLEFT",10,10)
local function rABS_MoveShapeshift()
ShapeshiftButton1:SetPoint("BOTTOMLEFT",fshift,"BOTTOMLEFT",10,10)
end
hooksecurefunc("ShapeshiftBar_Update", rABS_MoveShapeshift);

--possess bar
PossessBarFrame:SetParent(fshift)
PossessButton1:ClearAllPoints()
PossessButton1:SetPoint("BOTTOMLEFT", fshift, "BOTTOMLEFT", 10, 10);

--pet
PetActionBarFrame:SetParent(fpet)
PetActionBarFrame:SetWidth(0.01)
PetActionButton1:ClearAllPoints()
PetActionButton1:SetPoint("BOTTOMLEFT",fpet,"BOTTOMLEFT",10,10)

--right bars
MultiBarRight:SetParent(fbar45);
MultiBarLeft:SetParent(fbar45);
MultiBarRight:ClearAllPoints()
MultiBarRight:SetPoint("TOPRIGHT",-10,-10)

---------------------------------------------------
-- ACTIONBUTTONS MUST BE HIDDEN
---------------------------------------------------

-- hide actionbuttons when the bonusbar is visible (rogue stealth and such)
local function rABS_showhideactionbuttons(alpha)
local f = "ActionButton"
for i=1, 12 do
_G[f..i]:SetAlpha(alpha)
end
end
BonusActionBarFrame:HookScript("OnShow", function(self) rABS_showhideactionbuttons(0) end)
BonusActionBarFrame:HookScript("OnHide", function(self) rABS_showhideactionbuttons(1) end)
if BonusActionBarFrame:IsShown() then
rABS_showhideactionbuttons(0)
end

---------------------------------------------------
-- ON MOUSEOVER STUFF
---------------------------------------------------

--functions
local function rABS_showhidebar1(alpha)
if BonusActionBarFrame:IsShown() then
for i=1, 12 do
local pb = _G["BonusActionButton"..i]
pb:SetAlpha(alpha)
end
else
for i=1, 12 do
local pb = _G["ActionButton"..i]
pb:SetAlpha(alpha)
end
end
end


local function rABS_showhidebar2(alpha)
if MultiBarBottomLeft:IsShown() then
for i=1, 12 do
local pb = _G["MultiBarBottomLeftButton"..i]
pb:SetAlpha(alpha)
end
end
end

local function rABS_showhidebar3(alpha)
if MultiBarBottomRight:IsShown() then
for i=1, 12 do
local pb = _G["MultiBarBottomRightButton"..i]
pb:SetAlpha(alpha)
end
end
end

local function rABS_showhideshapeshift(alpha)
for i=1, NUM_SHAPESHIFT_SLOTS do
local pb = _G["ShapeshiftButton"..i]
pb:SetAlpha(alpha)
end;
end

local function rABS_showhidepet(alpha)
for i=1, NUM_PET_ACTION_SLOTS do
local pb = _G["PetActionButton"..i]
pb:SetAlpha(alpha)
end;
end

local function rABS_showhiderightbar(alpha)
if MultiBarLeft:IsShown() then
for i=1, 12 do
local pb = _G["MultiBarLeftButton"..i]
pb:SetAlpha(alpha)
end
end
if MultiBarRight:IsShown() then
for i=1, 12 do
local pb = _G["MultiBarRightButton"..i]
pb:SetAlpha(alpha)
end
end
end

local function rABS_showhidemicro(alpha)
for _, frame in pairs(MicroButtons) do
frame:SetAlpha(alpha)
end
end

local function rABS_showhidebags(alpha)
for _, frame in pairs(BagButtons) do
frame:SetAlpha(alpha)
end
end

--calls
if bar1_on_mouseover == 1 then
fbar1:EnableMouse(true)
fbar1:SetScript("OnEnter", function(self) rABS_showhidebar1(1) end)
fbar1:SetScript("OnLeave", function(self) rABS_showhidebar1(0) end)
for i=1, 12 do
local pb = _G["ActionButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhidebar1(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhidebar1(0) end)
local pb = _G["BonusActionButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhidebar1(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhidebar1(0) end)
end
end

if bar2_on_mouseover == 1 then
fbar2:EnableMouse(true)
fbar2:SetScript("OnEnter", function(self) rABS_showhidebar2(1) end)
fbar2:SetScript("OnLeave", function(self) rABS_showhidebar2(0) end)
for i=1, 12 do
local pb = _G["MultiBarBottomLeftButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhidebar2(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhidebar2(0) end)
end
end

if bar3_on_mouseover == 1 then
fbar3:EnableMouse(true)
fbar3:SetScript("OnEnter", function(self) rABS_showhidebar3(1) end)
fbar3:SetScript("OnLeave", function(self) rABS_showhidebar3(0) end)
for i=1, 12 do
local pb = _G["MultiBarBottomRightButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhidebar3(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhidebar3(0) end)
end
end

if shapeshift_on_mouseover == 1 then
fshift:EnableMouse(true)
fshift:SetScript("OnEnter", function(self) rABS_showhideshapeshift(1) end)
fshift:SetScript("OnLeave", function(self) rABS_showhideshapeshift(0) end)
for i=1, NUM_SHAPESHIFT_SLOTS do
local pb = _G["ShapeshiftButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhideshapeshift(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhideshapeshift(0) end)
end
end

if petbar_on_mouseover == 1 then
fpet:EnableMouse(true)
fpet:SetScript("OnEnter", function(self) rABS_showhidepet(1) end)
fpet:SetScript("OnLeave", function(self) rABS_showhidepet(0) end)
for i=1, NUM_PET_ACTION_SLOTS do
local pb = _G["PetActionButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhidepet(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhidepet(0) end)
end
end

if rightbars_on_mouseover == 1 then
fbar45:EnableMouse(true)
fbar45:SetScript("OnEnter", function(self) rABS_showhiderightbar(1) end)
fbar45:SetScript("OnLeave", function(self) rABS_showhiderightbar(0) end)
for i=1, 12 do
local pb = _G["MultiBarLeftButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhiderightbar(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhiderightbar(0) end)
local pb = _G["MultiBarRightButton"..i]
pb:SetAlpha(0)
pb:HookScript("OnEnter", function(self) rABS_showhiderightbar(1) end)
pb:HookScript("OnLeave", function(self) rABS_showhiderightbar(0) end)
end
end

if micromenu_on_mouseover == 1 then
fmicro:EnableMouse(true)
fmicro:SetScript("OnEnter", function(self) rABS_showhidemicro(1) end)
fmicro:SetScript("OnLeave", function(self) rABS_showhidemicro(0) end)
for _, f in pairs(MicroButtons) do
f:SetAlpha(0)
f:HookScript("OnEnter", function(self) rABS_showhidemicro(1) end)
f:HookScript("OnLeave", function(self) rABS_showhidemicro(0) end)
end
end

if bags_on_mouseover == 1 then
fbag:EnableMouse(true)
fbag:SetScript("OnEnter", function(self) rABS_showhidebags(1) end)
fbag:SetScript("OnLeave", function(self) rABS_showhidebags(0) end)
for _, f in pairs(BagButtons) do
f:SetAlpha(0)
f:HookScript("OnEnter", function(self) rABS_showhidebags(1) end)
f:HookScript("OnLeave", function(self) rABS_showhidebags(0) end)
end
end

---------------------------------------------------
-- MAKE THE DEFAULT BARS UNVISIBLE
---------------------------------------------------

local FramesToHide = {
MainMenuBar,
VehicleMenuBar,
}

local function rABS_HideDefaultFrames()
for _, f in pairs(FramesToHide) do
f:SetScale(0.001)
f:SetAlpha(0)
end
end
rABS_HideDefaultFrames();

---------------------------------------------------
-- SCALING
---------------------------------------------------

fbar1:SetScale(bar1scale)
fbar2:SetScale(bar2scale)
fbar3:SetScale(bar3scale)
fbar45:SetScale(bar45scale)

fpet:SetScale(petscale)
fshift:SetScale(shapeshiftscale)
fmicro:SetScale(micromenuscale)
fbag:SetScale(bagscale)


---------------------------------------------------
-- MOVABLE FRAMES
---------------------------------------------------

-- func
local function rABS_MoveThisFrame(f,moveit,lock)
if moveit == 1 then
f:SetMovable(true)
f:SetUserPlaced(true)
if lock ~= 1 then
f:EnableMouse(true)
f:RegisterForDrag("LeftButton","RightButton")
f:SetScript("OnDragStart", function(self) if IsShiftKeyDown() and IsAltKeyDown() then self:StartMoving() end end)
f:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end)
end
else
f:IsUserPlaced(false)
end
end

-- calls
rABS_MoveThisFrame(fmicro,move_micro,lock_micro)
rABS_MoveThisFrame(fbag,move_bags,lock_bags)
rABS_MoveThisFrame(fbar45,move_rightbars,lock_rightbars)
rABS_MoveThisFrame(fpet,move_pet,lock_pet)
rABS_MoveThisFrame(fshift,move_shapeshift,lock_shapeshift)
rABS_MoveThisFrame(fbar1,move_bar1,lock_bar1)
rABS_MoveThisFrame(fbar2,move_bar2,lock_bar2)
rABS_MoveThisFrame(fbar3,move_bar3,lock_bar3)
rABS_MoveThisFrame(fveb,move_veb,lock_veb)

if hide_bags == 1 then
fbag:SetScale(0.001)
fbag:SetAlpha(0)
end

if hide_micro == 1 then
fmicro:SetScale(0.001)
fmicro:SetAlpha(0)
end

if hide_shapeshift == 1 then
fshift:SetScale(0.001)
fshift:SetAlpha(0)
end

if hide_pet == 1 then
fpet:SetScale(0.001)
fpet:SetAlpha(0)
end
Show details Hide details

Change log

r497 by erik.raetz on Nov 16, 2009   Diff
latest PTR changes
Go to: 

Older revisions

r485 by erik.raetz on Oct 25, 2009   Diff
latest PTR patch 3.3 changes
r462 by erik.raetz on Sep 04, 2009   Diff
rothui090905

- added frame movability
r458 by erik.raetz on Aug 27, 2009   Diff
roth ui 090827
All revisions of this file

File info

Size: 22771 bytes, 653 lines
Hosted by Google Code