forked from SwimmingTiger/TotemTimers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ButtonFacade.lua
executable file
·41 lines (36 loc) · 1.11 KB
/
ButtonFacade.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
if select(2,UnitClass("player")) ~= "SHAMAN" then return end
local lbf
function TotemTimers.SkinCallback(arg, Group, SkinID, Gloss, Backdrop, Colors, Fonts)
local skins = lbf:GetSkins()
if skins[SkinID].icon then
TotemTimers.ApplySkin(skins[SkinID])
end
if SkinID == "Blizzard" then
for k,v in pairs(XiTimers.timers) do
v.animation.button.normalTexture:Hide()
v:HideNormalTexture()
end
else
for k,v in pairs(XiTimers.timers) do
v.animation.button.normalTexture:Show()
end
end
end
function TotemTimers.InitButtonFacade()
if not LibStub then return end
lbf = LibStub("Masque", true)
if lbf then
local group = lbf:Group("TotemTimers")
for k,v in pairs(XiTimers.timers) do
group:AddButton(v.button)
group:AddButton(v.animation.button)
end
for i = 1,#TTActionBars.bars do
for j = 1,#TTActionBars.bars[i].buttons do
group:AddButton(TTActionBars.bars[i].buttons[j])
end
end
lbf:Register("TotemTimers", TotemTimers.SkinCallback,nil)
group:ReSkin()
end
end