PageRenderTime 201ms CodeModel.GetById 197ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Tukui/modules/skins/raid.lua

http://github.com/Asphyxia/Tukui
Lua | 48 lines | 40 code | 8 blank | 0 comment | 5 complexity | f34021107e7406a3a8b9191e59e0d29e MD5 | raw file
 1local T, C, L = unpack(select(2, ...))
 2
 3local function LoadSkin()
 4	local buttons = {
 5		"RaidFrameRaidBrowserButton",
 6		"RaidFrameRaidInfoButton",
 7		"RaidFrameReadyCheckButton",
 8	}
 9
10	for i = 1, #buttons do
11		T.SkinButton(_G[buttons[i]])
12	end
13
14	local StripAllTextures = {
15		"RaidGroup1",
16		"RaidGroup2",
17		"RaidGroup3",
18		"RaidGroup4",
19		"RaidGroup5",
20		"RaidGroup6",
21		"RaidGroup7",
22		"RaidGroup8",
23	}
24
25	for _, object in pairs(StripAllTextures) do
26		_G[object]:StripTextures()
27	end
28
29	local function raidskinupdate()
30		nummembers = GetNumRaidMembers();
31
32		for i=1,nummembers do
33			T.SkinButton(_G["RaidGroupButton"..i])
34		end
35	end
36	raidskinupdate()
37	RaidFrame:HookScript("OnShow", raidskinupdate)
38	hooksecurefunc("RaidGroupFrame_OnEvent", raidskinupdate)
39
40	for i=1,8 do
41		for j=1,5 do
42			_G["RaidGroup"..i.."Slot"..j]:StripTextures()
43			_G["RaidGroup"..i.."Slot"..j]:SetTemplate("Transparent")
44		end
45	end
46end
47
48T.SkinFuncs["Blizzard_RaidUI"] = LoadSkin