PageRenderTime 22ms CodeModel.GetById 15ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Tukui/modules/skins/barbershop.lua

http://github.com/Asphyxia/Tukui
Lua | 56 lines | 43 code | 13 blank | 0 comment | 4 complexity | 66857601d76310daa0df530bbd58eb66 MD5 | raw file
 1local T, C, L = unpack(select(2, ...))
 2
 3local function LoadSkin()
 4	local buttons = {
 5		"BarberShopFrameOkayButton",
 6		"BarberShopFrameCancelButton",
 7		"BarberShopFrameResetButton",
 8	}
 9	BarberShopFrameOkayButton:Point("RIGHT", BarberShopFrameSelector4, "BOTTOM", 2, -50)
10	
11	for i = 1, #buttons do
12		_G[buttons[i]]:StripTextures()
13		T.SkinButton(_G[buttons[i]])
14	end
15	
16
17	for i = 1, 4 do
18		local f = _G["BarberShopFrameSelector"..i]
19		local f2 = _G["BarberShopFrameSelector"..i-1]
20		T.SkinNextPrevButton(_G["BarberShopFrameSelector"..i.."Prev"])
21		T.SkinNextPrevButton(_G["BarberShopFrameSelector"..i.."Next"])
22		
23		if i ~= 1 then
24			f:ClearAllPoints()
25			f:Point("TOP", f2, "BOTTOM", 0, -3)			
26		end
27		
28		if f then
29			f:StripTextures()
30		end
31	end
32	
33	BarberShopFrameSelector1:ClearAllPoints()
34	BarberShopFrameSelector1:Point("TOP", 0, -12)
35	
36	BarberShopFrameResetButton:ClearAllPoints()
37	BarberShopFrameResetButton:Point("BOTTOM", 0, 12)
38
39	BarberShopFrame:StripTextures()
40	BarberShopFrame:SetTemplate("Transparent")
41	BarberShopFrame:Size(BarberShopFrame:GetWidth() - 30, BarberShopFrame:GetHeight() - 56)
42	
43	BarberShopFrameMoneyFrame:StripTextures()
44	BarberShopFrameMoneyFrame:CreateBackdrop()
45	BarberShopFrameBackground:Kill()
46	
47	BarberShopBannerFrameBGTexture:Kill()
48	BarberShopBannerFrame:Kill()
49	
50	BarberShopAltFormFrameBorder:StripTextures()
51	BarberShopAltFormFrame:Point( "BOTTOM", BarberShopFrame, "TOP", 0, 5 )
52	BarberShopAltFormFrame:StripTextures()
53	BarberShopAltFormFrame:CreateBackdrop("Transparent")
54end
55
56T.SkinFuncs["Blizzard_BarbershopUI"] = LoadSkin