-
Notifications
You must be signed in to change notification settings - Fork 29
/
theme.lua
executable file
·4763 lines (4066 loc) · 184 KB
/
theme.lua
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
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
local F, C, L = unpack(select(2, ...))
if IsAddOnLoaded("Aurora") then
print("FreeUI includes an efficient built-in version of Aurora.")
print("It's highly recommended that you disable Aurora.")
return
end
local r, g, b = unpack(C.class)
local function CreateGradient(f)
local tex = f:CreateTexture(nil, "BACKGROUND")
tex:SetPoint("TOPLEFT")
tex:SetPoint("BOTTOMRIGHT")
tex:SetTexture(C.media.backdrop)
tex:SetGradientAlpha("VERTICAL", 0, 0, 0, .3, .35, .35, .35, .35)
end
F.CreateGradient = CreateGradient
local function StartGlow(f)
f:SetBackdropColor(r, g, b, .1)
f:SetBackdropBorderColor(r, g, b)
F.CreatePulse(f.glow)
end
local function StopGlow(f)
f:SetBackdropColor(0, 0, 0, 0)
f:SetBackdropBorderColor(0, 0, 0)
f.glow:SetScript("OnUpdate", nil)
f.glow:SetAlpha(0)
end
local function Reskin(f, noGlow)
f:SetNormalTexture("")
f:SetHighlightTexture("")
f:SetPushedTexture("")
f:SetDisabledTexture("")
local name = f:GetName()
if name then
local left = _G[name.."Left"]
local middle = _G[name.."Middle"]
local right = _G[name.."Right"]
if left then left:SetAlpha(0) end
if middle then middle:SetAlpha(0) end
if right then right:SetAlpha(0) end
end
F.CreateBD(f, 0)
CreateGradient(f)
if not noGlow then
f.glow = CreateFrame("Frame", nil, f)
f.glow:SetBackdrop({
edgeFile = C.media.glow,
edgeSize = 5,
})
f.glow:SetPoint("TOPLEFT", -6, 6)
f.glow:SetPoint("BOTTOMRIGHT", 6, -6)
f.glow:SetBackdropBorderColor(r, g, b)
f.glow:SetAlpha(0)
f:HookScript("OnEnter", StartGlow)
f:HookScript("OnLeave", StopGlow)
end
end
F.Reskin = Reskin
local function CreateTab(f)
f:DisableDrawLayer("BACKGROUND")
local bg = CreateFrame("Frame", nil, f)
bg:SetPoint("TOPLEFT", 8, -3)
bg:SetPoint("BOTTOMRIGHT", -8, 0)
bg:SetFrameLevel(f:GetFrameLevel()-1)
F.CreateBD(bg)
f:SetHighlightTexture(C.media.texture)
local hl = f:GetHighlightTexture()
hl:SetPoint("TOPLEFT", 9, -4)
hl:SetPoint("BOTTOMRIGHT", -9, 1)
hl:SetVertexColor(r, g, b, .25)
end
F.CreateTab = CreateTab
local function ReskinScroll(f)
local frame = f:GetName()
if _G[frame.."Track"] then _G[frame.."Track"]:Hide() end
if _G[frame.."BG"] then _G[frame.."BG"]:Hide() end
if _G[frame.."Top"] then _G[frame.."Top"]:Hide() end
if _G[frame.."Middle"] then _G[frame.."Middle"]:Hide() end
if _G[frame.."Bottom"] then _G[frame.."Bottom"]:Hide() end
local bu = _G[frame.."ThumbTexture"]
bu:SetAlpha(0)
bu:SetWidth(17)
bu.bg = CreateFrame("Frame", nil, f)
bu.bg:SetPoint("TOPLEFT", bu, 0, -2)
bu.bg:SetPoint("BOTTOMRIGHT", bu, 0, 4)
F.CreateBD(bu.bg, 0)
local tex = f:CreateTexture(nil, "BACKGROUND")
tex:SetPoint("TOPLEFT", bu.bg)
tex:SetPoint("BOTTOMRIGHT", bu.bg)
tex:SetTexture(C.media.backdrop)
tex:SetGradientAlpha("VERTICAL", 0, 0, 0, .3, .35, .35, .35, .35)
local up = _G[frame.."ScrollUpButton"]
local down = _G[frame.."ScrollDownButton"]
up:SetWidth(17)
down:SetWidth(17)
F.Reskin(up)
F.Reskin(down)
up:SetDisabledTexture(C.media.backdrop)
local dis1 = up:GetDisabledTexture()
dis1:SetVertexColor(0, 0, 0, .3)
dis1:SetDrawLayer("OVERLAY")
down:SetDisabledTexture(C.media.backdrop)
local dis2 = down:GetDisabledTexture()
dis2:SetVertexColor(0, 0, 0, .3)
dis2:SetDrawLayer("OVERLAY")
local uptex = up:CreateTexture(nil, "ARTWORK")
uptex:SetTexture("Interface\\AddOns\\FreeUI\\media\\arrow-up-active")
uptex:SetSize(8, 8)
uptex:SetPoint("CENTER")
uptex:SetVertexColor(1, 1, 1)
local downtex = down:CreateTexture(nil, "ARTWORK")
downtex:SetTexture("Interface\\AddOns\\FreeUI\\media\\arrow-down-active")
downtex:SetSize(8, 8)
downtex:SetPoint("CENTER")
downtex:SetVertexColor(1, 1, 1)
end
F.ReskinScroll = ReskinScroll
local function ReskinDropDown(f)
local frame = f:GetName()
local left = _G[frame.."Left"]
local middle = _G[frame.."Middle"]
local right = _G[frame.."Right"]
if left then left:SetAlpha(0) end
if middle then middle:SetAlpha(0) end
if right then right:SetAlpha(0) end
local down = _G[frame.."Button"]
down:SetSize(20, 20)
down:ClearAllPoints()
down:SetPoint("RIGHT", -18, 2)
F.Reskin(down)
down:SetDisabledTexture(C.media.backdrop)
local dis = down:GetDisabledTexture()
dis:SetVertexColor(0, 0, 0, .3)
dis:SetDrawLayer("OVERLAY")
dis:SetAllPoints()
local downtex = down:CreateTexture(nil, "ARTWORK")
downtex:SetTexture("Interface\\AddOns\\FreeUI\\media\\arrow-down-active")
downtex:SetSize(8, 8)
downtex:SetPoint("CENTER")
downtex:SetVertexColor(1, 1, 1)
local bg = CreateFrame("Frame", nil, f)
bg:SetPoint("TOPLEFT", 16, -4)
bg:SetPoint("BOTTOMRIGHT", -18, 8)
bg:SetFrameLevel(f:GetFrameLevel()-1)
F.CreateBD(bg, 0)
local tex = bg:CreateTexture(nil, "BACKGROUND")
tex:SetPoint("TOPLEFT")
tex:SetPoint("BOTTOMRIGHT")
tex:SetTexture(C.media.backdrop)
tex:SetGradientAlpha("VERTICAL", 0, 0, 0, .3, .35, .35, .35, .35)
end
F.ReskinDropDown = ReskinDropDown
local function ReskinClose(f, a1, p, a2, x, y)
f:SetSize(17, 17)
if not a1 then
f:SetPoint("TOPRIGHT", -4, -4)
else
f:ClearAllPoints()
f:SetPoint(a1, p, a2, x, y)
end
f:SetNormalTexture("")
f:SetHighlightTexture("")
f:SetPushedTexture("")
f:SetDisabledTexture("")
F.CreateBD(f, 0)
CreateGradient(f)
local text = f:CreateFontString(nil, "OVERLAY")
text:SetFont(C.media.font2, 14, "THINOUTLINE")
text:SetPoint("CENTER", 1, 1)
text:SetText("x")
f:HookScript("OnEnter", function(self) text:SetTextColor(1, .1, .1) end)
f:HookScript("OnLeave", function(self) text:SetTextColor(1, 1, 1) end)
end
F.ReskinClose = ReskinClose
local function ReskinInput(f, height, width)
local frame = f:GetName()
_G[frame.."Left"]:Hide()
if _G[frame.."Middle"] then _G[frame.."Middle"]:Hide() end
if _G[frame.."Mid"] then _G[frame.."Mid"]:Hide() end
_G[frame.."Right"]:Hide()
F.CreateBD(f, 0)
CreateGradient(f)
if height then f:SetHeight(height) end
if width then f:SetWidth(width) end
end
F.ReskinInput = ReskinInput
local function ReskinArrow(f, direction)
f:SetSize(18, 18)
F.Reskin(f)
f:SetDisabledTexture(C.media.backdrop)
local dis = f:GetDisabledTexture()
dis:SetVertexColor(0, 0, 0, .3)
dis:SetDrawLayer("OVERLAY")
local tex = f:CreateTexture(nil, "ARTWORK")
tex:SetSize(8, 8)
tex:SetPoint("CENTER")
if direction == 1 then
tex:SetTexture("Interface\\AddOns\\FreeUI\\media\\arrow-left-active")
elseif direction == 2 then
tex:SetTexture("Interface\\AddOns\\FreeUI\\media\\arrow-right-active")
end
end
F.ReskinArrow = ReskinArrow
local function ReskinCheck(f)
f:SetNormalTexture("")
f:SetPushedTexture("")
f:SetHighlightTexture(C.media.texture)
local hl = f:GetHighlightTexture()
hl:SetPoint("TOPLEFT", 5, -5)
hl:SetPoint("BOTTOMRIGHT", -5, 5)
hl:SetVertexColor(r, g, b, .2)
local bd = CreateFrame("Frame", nil, f)
bd:SetPoint("TOPLEFT", 4, -4)
bd:SetPoint("BOTTOMRIGHT", -4, 4)
bd:SetFrameLevel(f:GetFrameLevel()-1)
F.CreateBD(bd, 0)
local tex = f:CreateTexture(nil, "BACKGROUND")
tex:SetPoint("TOPLEFT", 5, -5)
tex:SetPoint("BOTTOMRIGHT", -5, 5)
tex:SetTexture(C.media.backdrop)
tex:SetGradientAlpha("VERTICAL", 0, 0, 0, .3, .35, .35, .35, .35)
end
F.ReskinCheck = ReskinCheck
local function ReskinSlider(f)
f:SetBackdrop(nil)
f.SetBackdrop = F.dummy
local bd = CreateFrame("Frame", nil, f)
bd:SetPoint("TOPLEFT", 1, -2)
bd:SetPoint("BOTTOMRIGHT", -1, 3)
bd:SetFrameStrata("BACKGROUND")
bd:SetFrameLevel(f:GetFrameLevel()-1)
F.CreateBD(bd, 0)
local tex = bd:CreateTexture(nil, "BACKGROUND")
tex:SetPoint("TOPLEFT")
tex:SetPoint("BOTTOMRIGHT")
tex:SetTexture(C.media.backdrop)
tex:SetGradientAlpha("VERTICAL", 0, 0, 0, .3, .35, .35, .35, .35)
local slider = select(4, f:GetRegions())
slider:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark")
slider:SetBlendMode("ADD")
end
F.ReskinSlider = ReskinSlider
local function ReskinExpandOrCollapse(f)
F.Reskin(f, true)
f.SetNormalTexture = F.dummy
f.minus = f:CreateTexture(nil, "OVERLAY")
f.minus:SetSize(7, 1)
f.minus:SetPoint("CENTER")
f.minus:SetTexture(C.media.backdrop)
f.minus:SetVertexColor(1, 1, 1)
f.plus = f:CreateTexture(nil, "OVERLAY")
f.plus:SetSize(1, 7)
f.plus:SetPoint("CENTER")
f.plus:SetTexture(C.media.backdrop)
f.plus:SetVertexColor(1, 1, 1)
end
F.ReskinExpandOrCollapse = ReskinExpandOrCollapse
local function SetBD(f, x, y, x2, y2)
local bg = CreateFrame("Frame", nil, f)
if not x then
bg:SetPoint("TOPLEFT")
bg:SetPoint("BOTTOMRIGHT")
else
bg:SetPoint("TOPLEFT", x, y)
bg:SetPoint("BOTTOMRIGHT", x2, y2)
end
bg:SetFrameLevel(0)
F.CreateBD(bg)
F.CreateSD(bg)
end
local _, class = UnitClass("player")
local Skin = CreateFrame("Frame", nil, UIParent)
Skin:RegisterEvent("ADDON_LOADED")
Skin:SetScript("OnEvent", function(self, event, addon)
if addon == "FreeUI" then
-- [[ Headers ]]
local header = {"GameMenuFrame", "InterfaceOptionsFrame", "AudioOptionsFrame", "VideoOptionsFrame", "ChatConfigFrame", "ColorPickerFrame"}
for i = 1, #header do
local title = _G[header[i].."Header"]
if title then
title:SetTexture("")
title:ClearAllPoints()
if title == _G["GameMenuFrameHeader"] then
title:SetPoint("TOP", GameMenuFrame, 0, 7)
else
title:SetPoint("TOP", header[i], 0, 0)
end
end
end
-- [[ Simple backdrops ]]
local bds = {"AutoCompleteBox", "BNToastFrame", "LFGSearchStatus", "TicketStatusFrameButton", "FriendsTooltip", "GearManagerDialogPopup", "TokenFramePopup", "ReputationDetailFrame", "RaidInfoFrame", "MissingLootFrame", "ScrollOfResurrectionSelectionFrame", "ScrollOfResurrectionFrame"}
for i = 1, #bds do
F.CreateBD(_G[bds[i]])
end
local lightbds = {"SpellBookCompanionModelFrame", "SecondaryProfession1", "SecondaryProfession2", "SecondaryProfession3", "SecondaryProfession4", "ChatConfigCategoryFrame", "ChatConfigBackgroundFrame", "ChatConfigChatSettingsLeft", "ChatConfigChatSettingsClassColorLegend", "ChatConfigChannelSettingsLeft", "ChatConfigChannelSettingsClassColorLegend", "FriendsFriendsList", "QuestLogCount", "HelpFrameTicketScrollFrame", "HelpFrameGM_ResponseScrollFrame1", "HelpFrameGM_ResponseScrollFrame2", "GuildRegistrarFrameEditBox", "FriendsFriendsNoteFrame", "AddFriendNoteFrame", "ScrollOfResurrectionSelectionFrameList"}
for i = 1, #lightbds do
F.CreateBD(_G[lightbds[i]], .25)
end
-- [[ Scroll bars ]]
local scrollbars = {"FriendsFrameFriendsScrollFrameScrollBar", "QuestLogScrollFrameScrollBar", "QuestLogDetailScrollFrameScrollBar", "CharacterStatsPaneScrollBar", "PVPHonorFrameTypeScrollFrameScrollBar", "PVPHonorFrameInfoScrollFrameScrollBar", "LFDQueueFrameSpecificListScrollFrameScrollBar", "GossipGreetingScrollFrameScrollBar", "HelpFrameKnowledgebaseScrollFrameScrollBar", "HelpFrameTicketScrollFrameScrollBar", "PaperDollTitlesPaneScrollBar", "PaperDollEquipmentManagerPaneScrollBar", "SendMailScrollFrameScrollBar", "OpenMailScrollFrameScrollBar", "RaidInfoScrollFrameScrollBar", "ChannelRosterScrollFrameScrollBar", "ReputationListScrollFrameScrollBar", "FriendsFriendsScrollFrameScrollBar", "HelpFrameGM_ResponseScrollFrame1ScrollBar", "HelpFrameGM_ResponseScrollFrame2ScrollBar", "HelpFrameKnowledgebaseScrollFrame2ScrollBar", "WhoListScrollFrameScrollBar", "QuestProgressScrollFrameScrollBar", "QuestRewardScrollFrameScrollBar", "QuestDetailScrollFrameScrollBar", "QuestGreetingScrollFrameScrollBar", "QuestNPCModelTextScrollFrameScrollBar", "GearManagerDialogPopupScrollFrameScrollBar", "LFDQueueFrameRandomScrollFrameScrollBar", "WarGamesFrameScrollFrameScrollBar", "WarGamesFrameInfoScrollFrameScrollBar", "BCMCopyScrollScrollBar", "WorldStateScoreScrollFrameScrollBar", "ItemTextScrollFrameScrollBar", "ScrollOfResurrectionSelectionFrameListScrollFrameScrollBar"}
for i = 1, #scrollbars do
ReskinScroll(_G[scrollbars[i]])
end
-- [[ Dropdowns ]]
local dropdowns = {"FriendsFrameStatusDropDown", "LFDQueueFrameTypeDropDown", "LFRBrowseFrameRaidDropDown", "WhoFrameDropDown", "FriendsFriendsFrameDropDown", "WorldMapLevelDropDown", "RaidFinderQueueFrameSelectionDropDown", "WorldMapShowDropDown", "Advanced_GraphicsAPIDropDown"}
for i = 1, #dropdowns do
button = _G[dropdowns[i]]
ReskinDropDown(button)
end
-- [[ Input frames ]]
local inputs = {"AddFriendNameEditBox", "PVPTeamManagementFrameWeeklyDisplay", "SendMailNameEditBox", "SendMailSubjectEditBox", "SendMailMoneyGold", "SendMailMoneySilver", "SendMailMoneyCopper", "StaticPopup1MoneyInputFrameGold", "StaticPopup1MoneyInputFrameSilver", "StaticPopup1MoneyInputFrameCopper", "StaticPopup2MoneyInputFrameGold", "StaticPopup2MoneyInputFrameSilver", "StaticPopup2MoneyInputFrameCopper", "GearManagerDialogPopupEditBox", "FriendsFrameBroadcastInput", "HelpFrameKnowledgebaseSearchBox", "ChannelFrameDaughterFrameChannelName", "ChannelFrameDaughterFrameChannelPassword", "TradePlayerInputMoneyFrameGold", "TradePlayerInputMoneyFrameSilver", "TradePlayerInputMoneyFrameCopper", "ScrollOfResurrectionSelectionFrameTargetEditBox", "ScrollOfResurrectionFrameNoteFrame"}
for i = 1, #inputs do
input = _G[inputs[i]]
ReskinInput(input)
end
ReskinInput(StaticPopup1EditBox, 20)
ReskinInput(StaticPopup2EditBox, 20)
ReskinInput(PVPBannerFrameEditBox, 20)
-- [[ Arrows ]]
ReskinArrow(SpellBookPrevPageButton, 1)
ReskinArrow(SpellBookNextPageButton, 2)
ReskinArrow(InboxPrevPageButton, 1)
ReskinArrow(InboxNextPageButton, 2)
ReskinArrow(MerchantPrevPageButton, 1)
ReskinArrow(MerchantNextPageButton, 2)
ReskinArrow(CharacterFrameExpandButton, 1)
ReskinArrow(PVPTeamManagementFrameWeeklyToggleLeft, 1)
ReskinArrow(PVPTeamManagementFrameWeeklyToggleRight, 2)
ReskinArrow(PVPBannerFrameCustomization1LeftButton, 1)
ReskinArrow(PVPBannerFrameCustomization1RightButton, 2)
ReskinArrow(PVPBannerFrameCustomization2LeftButton, 1)
ReskinArrow(PVPBannerFrameCustomization2RightButton, 2)
ReskinArrow(ItemTextPrevPageButton, 1)
ReskinArrow(ItemTextNextPageButton, 2)
ReskinArrow(TabardCharacterModelRotateLeftButton, 1)
ReskinArrow(TabardCharacterModelRotateRightButton, 2)
for i = 1, 5 do
ReskinArrow(_G["TabardFrameCustomization"..i.."LeftButton"], 1)
ReskinArrow(_G["TabardFrameCustomization"..i.."RightButton"], 2)
end
hooksecurefunc("CharacterFrame_Expand", function()
select(15, CharacterFrameExpandButton:GetRegions()):SetTexture("Interface\\AddOns\\FreeUI\\media\\arrow-left-active")
end)
hooksecurefunc("CharacterFrame_Collapse", function()
select(15, CharacterFrameExpandButton:GetRegions()):SetTexture("Interface\\AddOns\\FreeUI\\media\\arrow-right-active")
end)
-- [[ Check boxes ]]
local checkboxes = {"WorldMapShowDigSites", "WorldMapQuestShowObjectives", "WorldMapTrackQuest", "TokenFramePopupInactiveCheckBox", "TokenFramePopupBackpackCheckBox", "ReputationDetailAtWarCheckBox", "ReputationDetailInactiveCheckBox", "ReputationDetailMainScreenCheckBox"}
for i = 1, #checkboxes do
local checkbox = _G[checkboxes[i]]
ReskinCheck(checkbox)
end
ReskinCheck(LFDQueueFrameRoleButtonTank:GetChildren())
ReskinCheck(LFDQueueFrameRoleButtonHealer:GetChildren())
ReskinCheck(LFDQueueFrameRoleButtonDPS:GetChildren())
ReskinCheck(LFDQueueFrameRoleButtonLeader:GetChildren())
ReskinCheck(LFRQueueFrameRoleButtonTank:GetChildren())
ReskinCheck(LFRQueueFrameRoleButtonHealer:GetChildren())
ReskinCheck(LFRQueueFrameRoleButtonDPS:GetChildren())
ReskinCheck(LFDRoleCheckPopupRoleButtonTank:GetChildren())
ReskinCheck(LFDRoleCheckPopupRoleButtonHealer:GetChildren())
ReskinCheck(LFDRoleCheckPopupRoleButtonDPS:GetChildren())
ReskinCheck(RaidFinderQueueFrameRoleButtonTank:GetChildren())
ReskinCheck(RaidFinderQueueFrameRoleButtonHealer:GetChildren())
ReskinCheck(RaidFinderQueueFrameRoleButtonDPS:GetChildren())
ReskinCheck(RaidFinderQueueFrameRoleButtonLeader:GetChildren())
ReskinCheck(LFGInvitePopupRoleButtonTank:GetChildren())
ReskinCheck(LFGInvitePopupRoleButtonHealer:GetChildren())
ReskinCheck(LFGInvitePopupRoleButtonDPS:GetChildren())
if C.general.helmcloakbuttons == true then
ReskinCheck(FreeUI_HelmCheckBox)
ReskinCheck(FreeUI_CloakCheckBox)
end
-- [[ Backdrop frames ]]
SetBD(FriendsFrame)
SetBD(QuestLogFrame, 6, -9, -2, 6)
SetBD(QuestFrame, 6, -15, -26, 64)
SetBD(QuestLogDetailFrame, 6, -9, 0, 0)
SetBD(GossipFrame, 6, -15, -26, 64)
SetBD(MerchantFrame, 10, -10, -34, 61)
SetBD(MailFrame, 10, -12, -34, 74)
SetBD(OpenMailFrame, 10, -12, -34, 74)
SetBD(DressUpFrame, 10, -12, -34, 74)
SetBD(TaxiFrame, 3, -23, -5, 3)
SetBD(TradeFrame, 10, -12, -30, 52)
SetBD(ItemTextFrame, 16, -8, -28, 62)
SetBD(TabardFrame, 10, -12, -34, 74)
SetBD(HelpFrame)
SetBD(GuildRegistrarFrame, 6, -15, -26, 64)
SetBD(PetitionFrame, 6, -15, -26, 64)
SetBD(SpellBookFrame)
SetBD(LFDParentFrame)
SetBD(CharacterFrame)
SetBD(PVPFrame)
SetBD(PVPBannerFrame)
SetBD(PetStableFrame)
SetBD(WorldStateScoreFrame)
SetBD(RaidParentFrame)
local FrameBDs = {"StaticPopup1", "StaticPopup2", "GameMenuFrame", "InterfaceOptionsFrame", "VideoOptionsFrame", "AudioOptionsFrame", "LFGDungeonReadyStatus", "ChatConfigFrame", "StackSplitFrame", "AddFriendFrame", "FriendsFriendsFrame", "ColorPickerFrame", "ReadyCheckFrame", "LFGDungeonReadyDialog", "LFDRoleCheckPopup", "RolePollPopup", "GuildInviteFrame", "ChannelFrameDaughterFrame", "LFGInvitePopup"}
for i = 1, #FrameBDs do
FrameBD = _G[FrameBDs[i]]
F.CreateBD(FrameBD)
F.CreateSD(FrameBD)
end
NPCBD = CreateFrame("Frame", nil, QuestNPCModel)
NPCBD:SetPoint("TOPLEFT", 0, 1)
NPCBD:SetPoint("RIGHT", 1, 0)
NPCBD:SetPoint("BOTTOM", QuestNPCModelTextScrollFrame)
NPCBD:SetFrameLevel(QuestNPCModel:GetFrameLevel()-1)
F.CreateBD(NPCBD)
local line = CreateFrame("Frame", nil, QuestNPCModel)
line:SetPoint("BOTTOMLEFT", 0, -1)
line:SetPoint("BOTTOMRIGHT", 0, -1)
line:SetHeight(1)
line:SetFrameLevel(QuestNPCModel:GetFrameLevel()-1)
F.CreateBD(line, 0)
LFGDungeonReadyDialog.SetBackdrop = F.dummy
-- [[ Custom skins ]]
-- Dropdown lists
local function SkinDropDownList(level, index)
for i = 1, UIDROPDOWNMENU_MAXLEVELS do
local menu = _G["DropDownList"..i.."MenuBackdrop"]
local backdrop = _G["DropDownList"..i.."Backdrop"]
if not backdrop.reskinned then
F.CreateBD(menu)
F.CreateBD(backdrop)
backdrop.reskinned = true
end
end
end
hooksecurefunc("UIDropDownMenu_CreateFrames", SkinDropDownList)
-- Pet stuff
if class == "HUNTER" or class == "MAGE" or class == "DEATHKNIGHT" or class == "WARLOCK" then
if class == "HUNTER" then
PetStableFrame:DisableDrawLayer("BACKGROUND")
PetStableFrame:DisableDrawLayer("BORDER")
PetStableFrameInset:DisableDrawLayer("BACKGROUND")
PetStableFrameInset:DisableDrawLayer("BORDER")
PetStableBottomInset:DisableDrawLayer("BACKGROUND")
PetStableBottomInset:DisableDrawLayer("BORDER")
PetStableLeftInset:DisableDrawLayer("BACKGROUND")
PetStableLeftInset:DisableDrawLayer("BORDER")
PetStableFramePortrait:Hide()
PetStableModelShadow:Hide()
PetStableFramePortraitFrame:Hide()
PetStableFrameTopBorder:Hide()
PetStableFrameTopRightCorner:Hide()
PetStableModelRotateLeftButton:Hide()
PetStableModelRotateRightButton:Hide()
ReskinClose(PetStableFrameCloseButton)
ReskinArrow(PetStablePrevPageButton, 1)
ReskinArrow(PetStableNextPageButton, 2)
for i = 1, 10 do
local bu = _G["PetStableStabledPet"..i]
local bd = CreateFrame("Frame", nil, bu)
bd:SetPoint("TOPLEFT", -1, 1)
bd:SetPoint("BOTTOMRIGHT", 1, -1)
F.CreateBD(bd, .25)
bu:SetNormalTexture("")
bu:DisableDrawLayer("BACKGROUND")
_G["PetStableStabledPet"..i.."IconTexture"]:SetTexCoord(.08, .92, .08, .92)
end
end
local function FixTab()
if CharacterFrameTab2:IsShown() then
CharacterFrameTab3:SetPoint("LEFT", CharacterFrameTab2, "RIGHT", -15, 0)
else
CharacterFrameTab3:SetPoint("LEFT", CharacterFrameTab1, "RIGHT", -15, 0)
end
end
CharacterFrame:HookScript("OnEvent", FixTab)
CharacterFrame:HookScript("OnShow", FixTab)
PetModelFrameRotateLeftButton:Hide()
PetModelFrameRotateRightButton:Hide()
PetModelFrameShadowOverlay:Hide()
PetPaperDollXPBar1:Hide()
select(2, PetPaperDollFrameExpBar:GetRegions()):Hide()
PetPaperDollPetModelBg:SetAlpha(0)
PetPaperDollFrameExpBar:SetStatusBarTexture(C.media.texture)
local bbg = CreateFrame("Frame", nil, PetPaperDollFrameExpBar)
bbg:SetPoint("TOPLEFT", -1, 1)
bbg:SetPoint("BOTTOMRIGHT", 1, -1)
bbg:SetFrameLevel(PetPaperDollFrameExpBar:GetFrameLevel()-1)
F.CreateBD(bbg, .25)
end
-- Ghost frame
GhostFrameContentsFrameIcon:SetTexCoord(.08, .92, .08, .92)
local GhostBD = CreateFrame("Frame", nil, GhostFrameContentsFrame)
GhostBD:SetPoint("TOPLEFT", GhostFrameContentsFrameIcon, -1, 1)
GhostBD:SetPoint("BOTTOMRIGHT", GhostFrameContentsFrameIcon, 1, -1)
F.CreateBD(GhostBD, 0)
-- Mail frame
OpenMailLetterButton:SetNormalTexture("")
OpenMailLetterButton:SetPushedTexture("")
OpenMailLetterButtonIconTexture:SetTexCoord(.08, .92, .08, .92)
local bgmail = CreateFrame("Frame", nil, OpenMailLetterButton)
bgmail:SetPoint("TOPLEFT", -1, 1)
bgmail:SetPoint("BOTTOMRIGHT", 1, -1)
bgmail:SetFrameLevel(OpenMailLetterButton:GetFrameLevel()-1)
F.CreateBD(bgmail)
OpenMailMoneyButton:SetNormalTexture("")
OpenMailMoneyButton:SetPushedTexture("")
OpenMailMoneyButtonIconTexture:SetTexCoord(.08, .92, .08, .92)
local bgmoney = CreateFrame("Frame", nil, OpenMailMoneyButton)
bgmoney:SetPoint("TOPLEFT", -1, 1)
bgmoney:SetPoint("BOTTOMRIGHT", 1, -1)
bgmoney:SetFrameLevel(OpenMailMoneyButton:GetFrameLevel()-1)
F.CreateBD(bgmoney)
for i = 1, INBOXITEMS_TO_DISPLAY do
local it = _G["MailItem"..i]
local bu = _G["MailItem"..i.."Button"]
local st = _G["MailItem"..i.."ButtonSlot"]
local ic = _G["MailItem"..i.."Button".."Icon"]
local line = select(3, _G["MailItem"..i]:GetRegions())
local a, b = it:GetRegions()
a:Hide()
b:Hide()
bu:SetCheckedTexture(C.media.checked)
st:Hide()
line:Hide()
ic:SetTexCoord(.08, .92, .08, .92)
local bg = CreateFrame("Frame", nil, bu)
bg:SetPoint("TOPLEFT", -1, 1)
bg:SetPoint("BOTTOMRIGHT", 1, -1)
bg:SetFrameLevel(bu:GetFrameLevel()-1)
F.CreateBD(bg, 0)
end
for i = 1, ATTACHMENTS_MAX_SEND do
local bu = _G["SendMailAttachment"..i]
bu:GetRegions():Hide()
local bg = CreateFrame("Frame", nil, bu)
bg:SetPoint("TOPLEFT", -1, 1)
bg:SetPoint("BOTTOMRIGHT", 1, -1)
bg:SetFrameLevel(0)
F.CreateBD(bg, .25)
end
for i = 1, ATTACHMENTS_MAX_RECEIVE do
local bu = _G["OpenMailAttachmentButton"..i]
local ic = _G["OpenMailAttachmentButton"..i.."IconTexture"]
bu:SetNormalTexture("")
bu:SetPushedTexture("")
ic:SetTexCoord(.08, .92, .08, .92)
local bg = CreateFrame("Frame", nil, bu)
bg:SetPoint("TOPLEFT", -1, 1)
bg:SetPoint("BOTTOMRIGHT", 1, -1)
bg:SetFrameLevel(0)
F.CreateBD(bg, .25)
end
hooksecurefunc("SendMailFrame_Update", function()
for i = 1, ATTACHMENTS_MAX_SEND do
local button = _G["SendMailAttachment"..i]
if button:GetNormalTexture() then
button:GetNormalTexture():SetTexCoord(.08, .92, .08, .92)
end
end
end)
-- Currency frame
TokenFrame:HookScript("OnShow", function()
for i=1, GetCurrencyListSize() do
local button = _G["TokenFrameContainerButton"..i]
if button and not button.reskinned then
button.highlight:SetPoint("TOPLEFT", 1, 0)
button.highlight:SetPoint("BOTTOMRIGHT", -1, 0)
button.highlight.SetPoint = F.dummy
button.highlight:SetTexture(r, g, b, .2)
button.highlight.SetTexture = F.dummy
button.categoryMiddle:SetAlpha(0)
button.categoryLeft:SetAlpha(0)
button.categoryRight:SetAlpha(0)
if button.icon and button.icon:GetTexture() then
button.icon:SetTexCoord(.08, .92, .08, .92)
F.CreateBG(button.icon)
end
button.reskinned = true
end
end
end)
-- Reputation frame
local function UpdateFactionSkins()
for i = 1, GetNumFactions() do
local statusbar = _G["ReputationBar"..i.."ReputationBar"]
if statusbar then
statusbar:SetStatusBarTexture(C.media.texture)
if not statusbar.reskinned then
F.CreateBD(statusbar, .25)
statusbar.reskinned = true
end
_G["ReputationBar"..i.."Background"]:SetTexture(nil)
_G["ReputationBar"..i.."LeftLine"]:SetAlpha(0)
_G["ReputationBar"..i.."BottomLine"]:SetAlpha(0)
_G["ReputationBar"..i.."ReputationBarHighlight1"]:SetTexture(nil)
_G["ReputationBar"..i.."ReputationBarHighlight2"]:SetTexture(nil)
_G["ReputationBar"..i.."ReputationBarAtWarHighlight1"]:SetTexture(nil)
_G["ReputationBar"..i.."ReputationBarAtWarHighlight2"]:SetTexture(nil)
_G["ReputationBar"..i.."ReputationBarLeftTexture"]:SetTexture(nil)
_G["ReputationBar"..i.."ReputationBarRightTexture"]:SetTexture(nil)
end
end
end
ReputationFrame:HookScript("OnShow", UpdateFactionSkins)
ReputationFrame:HookScript("OnEvent", UpdateFactionSkins)
for i = 1, NUM_FACTIONS_DISPLAYED do
local bu = _G["ReputationBar"..i.."ExpandOrCollapseButton"]
F.ReskinExpandOrCollapse(bu)
end
hooksecurefunc("ReputationFrame_Update", function()
local numFactions = GetNumFactions()
local factionIndex, factionButton, isCollapsed
local factionOffset = FauxScrollFrame_GetOffset(ReputationListScrollFrame)
for i = 1, NUM_FACTIONS_DISPLAYED do
factionIndex = factionOffset + i
factionButton = _G["ReputationBar"..i.."ExpandOrCollapseButton"]
if factionIndex <= numFactions then
_, _, _, _, _, _, _, _, _, isCollapsed = GetFactionInfo(factionIndex)
if isCollapsed then
factionButton.plus:Show()
else
factionButton.plus:Hide()
end
end
end
end)
-- LFD frame
LFDQueueFrameCapBarProgress:SetTexture(C.media.texture)
LFDQueueFrameCapBarCap1:SetTexture(C.media.texture)
LFDQueueFrameCapBarCap2:SetTexture(C.media.texture)
LFDQueueFrameCapBarLeft:Hide()
LFDQueueFrameCapBarMiddle:Hide()
LFDQueueFrameCapBarRight:Hide()
LFDQueueFrameCapBarBG:SetTexture(nil)
LFDQueueFrameCapBar.backdrop = CreateFrame("Frame", nil, LFDQueueFrameCapBar)
LFDQueueFrameCapBar.backdrop:SetPoint("TOPLEFT", LFDQueueFrameCapBar, "TOPLEFT", -1, -2)
LFDQueueFrameCapBar.backdrop:SetPoint("BOTTOMRIGHT", LFDQueueFrameCapBar, "BOTTOMRIGHT", 1, 2)
LFDQueueFrameCapBar.backdrop:SetFrameLevel(0)
F.CreateBD(LFDQueueFrameCapBar.backdrop)
for i = 1, 2 do
local bu = _G["LFDQueueFrameCapBarCap"..i.."Marker"]
_G["LFDQueueFrameCapBarCap"..i.."MarkerTexture"]:Hide()
local cap = bu:CreateTexture(nil, "OVERLAY")
cap:SetSize(1, 14)
cap:SetPoint("CENTER")
cap:SetTexture(C.media.backdrop)
cap:SetVertexColor(0, 0, 0)
end
LFDQueueFrameRandomScrollFrame:SetWidth(304)
local function ReskinRewards()
for i = 1, LFD_MAX_REWARDS do
local button = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i]
local icon = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."IconTexture"]
if button then
if not button.reskinned then
local cta = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."ShortageBorder"]
local count = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."Count"]
local na = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."NameFrame"]
F.CreateBG(icon)
icon:SetTexCoord(.08, .92, .08, .92)
icon:SetDrawLayer("OVERLAY")
count:SetDrawLayer("OVERLAY")
na:SetTexture(0, 0, 0, .25)
na:SetSize(118, 39)
cta:SetAlpha(0)
button.bg2 = CreateFrame("Frame", nil, button)
button.bg2:SetPoint("TOPLEFT", na, "TOPLEFT", 10, 0)
button.bg2:SetPoint("BOTTOMRIGHT", na, "BOTTOMRIGHT")
F.CreateBD(button.bg2, 0)
button.reskinned = true
end
end
end
end
hooksecurefunc("LFDQueueFrameRandom_UpdateFrame", ReskinRewards)
for i = 1, NUM_LFD_CHOICE_BUTTONS do
ReskinCheck(_G["LFDQueueFrameSpecificListButton"..i.."EnableButton"])
F.ReskinExpandOrCollapse(_G["LFDQueueFrameSpecificListButton"..i.."ExpandOrCollapseButton"])
end
for i = 1, NUM_LFR_CHOICE_BUTTONS do
local bu = _G["LFRQueueFrameSpecificListButton"..i.."EnableButton"]
ReskinCheck(bu)
bu.SetNormalTexture = F.dummy
bu.SetPushedTexture = F.dummy
F.ReskinExpandOrCollapse(_G["LFRQueueFrameSpecificListButton"..i.."ExpandOrCollapseButton"])
end
hooksecurefunc("LFDQueueFrameSpecificListButton_SetDungeon", function(button, dungeonID)
local isCollapsed = LFGCollapseList[dungeonID]
if isCollapsed then
button.expandOrCollapseButton.plus:Show()
else
button.expandOrCollapseButton.plus:Hide()
end
end)
hooksecurefunc("LFRQueueFrameSpecificListButton_SetDungeon", function(button, dungeonID)
local isCollapsed = LFGCollapseList[dungeonID]
if isCollapsed then
button.expandOrCollapseButton.plus:Show()
else
button.expandOrCollapseButton.plus:Hide()
end
end)
-- Raid Finder
for i = 1, 2 do
local tab = _G["LFRParentFrameSideTab"..i]
tab:GetRegions():Hide()
tab:SetCheckedTexture(C.media.checked)
if i == 1 then
local a1, p, a2, x, y = tab:GetPoint()
tab:SetPoint(a1, p, a2, x + 11, y)
end
F.CreateBG(tab)
F.CreateSD(tab, 5, 0, 0, 0, 1, 1)
select(2, tab:GetRegions()):SetTexCoord(.08, .92, .08, .92)
end
for i = 1, LFD_MAX_REWARDS do
local button = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..i]
local icon = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..i.."IconTexture"]
if button then
if not button.reskinned then
local cta = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..i.."ShortageBorder"]
local count = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..i.."Count"]
local na = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..i.."NameFrame"]
F.CreateBG(icon)
icon:SetTexCoord(.08, .92, .08, .92)
icon:SetDrawLayer("OVERLAY")
count:SetDrawLayer("OVERLAY")
na:SetTexture(0, 0, 0, .25)
na:SetSize(118, 39)
cta:SetAlpha(0)
button.bg2 = CreateFrame("Frame", nil, button)
button.bg2:SetPoint("TOPLEFT", na, "TOPLEFT", 10, 0)
button.bg2:SetPoint("BOTTOMRIGHT", na, "BOTTOMRIGHT")
F.CreateBD(button.bg2, 0)
button.reskinned = true
end
end
end
RaidParentFrameTab2:SetPoint("LEFT", RaidParentFrameTab1, "RIGHT", -15, 0)
RaidParentFrameTab3:SetPoint("LEFT", RaidParentFrameTab2, "RIGHT", -15, 0)
-- Spellbook
for i = 1, SPELLS_PER_PAGE do
local bu = _G["SpellButton"..i]
local ic = _G["SpellButton"..i.."IconTexture"]
_G["SpellButton"..i.."Background"]:SetAlpha(0)
_G["SpellButton"..i.."TextBackground"]:Hide()
_G["SpellButton"..i.."SlotFrame"]:SetAlpha(0)
_G["SpellButton"..i.."UnlearnedSlotFrame"]:SetAlpha(0)
_G["SpellButton"..i.."Highlight"]:SetAlpha(0)
bu:SetCheckedTexture("")
bu:SetPushedTexture("")
ic:SetTexCoord(.08, .92, .08, .92)
ic.bg = F.CreateBG(bu)
end
hooksecurefunc("SpellButton_UpdateButton", function(self)
local slot, slotType = SpellBook_GetSpellBookSlot(self);
local name = self:GetName();
local subSpellString = _G[name.."SubSpellName"]
subSpellString:SetTextColor(1, 1, 1)
if slotType == "FUTURESPELL" then
local level = GetSpellAvailableLevel(slot, SpellBookFrame.bookType)
if (level and level > UnitLevel("player")) then
self.RequiredLevelString:SetTextColor(.7, .7, .7)
self.SpellName:SetTextColor(.7, .7, .7)
subSpellString:SetTextColor(.7, .7, .7)
end
end
local ic = _G[name.."IconTexture"]
if not ic.bg then return end
if ic:IsShown() then
ic.bg:Show()
else
ic.bg:Hide()
end
end)
for i = 1, 5 do
local tab = _G["SpellBookSkillLineTab"..i]
tab:GetRegions():Hide()
tab:SetCheckedTexture(C.media.checked)
local a1, p, a2, x, y = tab:GetPoint()
tab:SetPoint(a1, p, a2, x + 11, y)
F.CreateBG(tab)
F.CreateSD(tab, 5, 0, 0, 0, 1, 1)
_G["SpellBookSkillLineTab"..i.."TabardIconFrame"]:SetTexCoord(.08, .92, .08, .92)
select(4, tab:GetRegions()):SetTexCoord(.08, .92, .08, .92)
end
-- Professions
local professions = {"PrimaryProfession1", "PrimaryProfession2", "SecondaryProfession1", "SecondaryProfession2", "SecondaryProfession3", "SecondaryProfession4"}
for _, button in pairs(professions) do
local bu = _G[button]
bu.professionName:SetTextColor(1, 1, 1)
bu.missingHeader:SetTextColor(1, 1, 1)
bu.missingText:SetTextColor(1, 1, 1)
bu.statusBar:SetHeight(13)
bu.statusBar:SetStatusBarTexture(C.media.texture)
bu.statusBar:GetStatusBarTexture():SetGradient("VERTICAL", 0, .6, 0, 0, .8, 0)
bu.statusBar.rankText:SetPoint("CENTER")
local _, p = bu.statusBar:GetPoint()
bu.statusBar:SetPoint("TOPLEFT", p, "BOTTOMLEFT", 1, -3)
_G[button.."StatusBarLeft"]:Hide()
bu.statusBar.capRight:SetAlpha(0)
_G[button.."StatusBarBGLeft"]:Hide()
_G[button.."StatusBarBGMiddle"]:Hide()
_G[button.."StatusBarBGRight"]:Hide()
local bg = CreateFrame("Frame", nil, bu.statusBar)
bg:SetPoint("TOPLEFT", -1, 1)
bg:SetPoint("BOTTOMRIGHT", 1, -1)
bg:SetFrameLevel(bu:GetFrameLevel()-1)
F.CreateBD(bg, .25)
end
local professionbuttons = {"PrimaryProfession1SpellButtonTop", "PrimaryProfession1SpellButtonBottom", "PrimaryProfession2SpellButtonTop", "PrimaryProfession2SpellButtonBottom", "SecondaryProfession1SpellButtonLeft", "SecondaryProfession1SpellButtonRight", "SecondaryProfession2SpellButtonLeft", "SecondaryProfession2SpellButtonRight", "SecondaryProfession3SpellButtonLeft", "SecondaryProfession3SpellButtonRight", "SecondaryProfession4SpellButtonLeft", "SecondaryProfession4SpellButtonRight"}
for _, button in pairs(professionbuttons) do
local icon = _G[button.."IconTexture"]
local bu = _G[button]