PageRenderTime 33ms CodeModel.GetById 28ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Tukui/modules/skins/raidinfo.lua

http://github.com/Asphyxia/Tukui
Lua | 42 lines | 36 code | 6 blank | 0 comment | 3 complexity | fa7c83a34c8b31f0bc560b640a72e8e2 MD5 | raw file
 1local T, C, L = unpack(select(2, ...))
 2
 3local function LoadSkin()
 4	local StripAllTextures = {
 5		"RaidInfoFrame",
 6		"RaidInfoInstanceLabel",
 7		"RaidInfoIDLabel",
 8	}
 9
10	local KillTextures = {
11		"RaidInfoScrollFrameScrollBarBG",
12		"RaidInfoScrollFrameScrollBarTop",
13		"RaidInfoScrollFrameScrollBarBottom",
14		"RaidInfoScrollFrameScrollBarMiddle",
15	}
16	local buttons = {
17		"RaidFrameConvertToRaidButton",
18		"RaidFrameRaidInfoButton",
19		"RaidFrameNotInRaidRaidBrowserButton",
20		"RaidInfoExtendButton",
21		"RaidInfoCancelButton",
22	}
23
24	for _, object in pairs(StripAllTextures) do
25		_G[object]:StripTextures()
26	end
27
28	for _, texture in pairs(KillTextures) do
29		_G[texture]:Kill()
30	end
31
32	for i = 1, #buttons do
33		T.SkinButton(_G[buttons[i]])
34	end
35	RaidInfoScrollFrame:StripTextures()
36	RaidInfoFrame:CreateBackdrop("Transparent")
37	RaidInfoFrame.backdrop:Point( "TOPLEFT", RaidInfoFrame, "TOPLEFT")
38	RaidInfoFrame.backdrop:Point( "BOTTOMRIGHT", RaidInfoFrame, "BOTTOMRIGHT")
39	T.SkinCloseButton(RaidInfoCloseButton,RaidInfoFrame)
40end
41
42tinsert(T.SkinFuncs["Tukui"], LoadSkin)