PageRenderTime 102ms CodeModel.GetById 70ms app.highlight 2ms RepoModel.GetById 18ms app.codeStats 10ms

/Tukui/modules/skins/tabard.lua

http://github.com/Asphyxia/Tukui
Lua | 37 lines | 31 code | 6 blank | 0 comment | 2 complexity | 88d4b1adff0e32aeba38acb12741780d MD5 | raw file
 1local T, C, L = unpack(select(2, ...))
 2
 3local function LoadSkin()
 4	TabardFrame:StripTextures(true)
 5	TabardFrame:SetTemplate("Transparent")
 6	TabardModel:CreateBackdrop("Transparent")
 7	T.SkinButton(TabardFrameCancelButton)
 8	T.SkinButton(TabardFrameAcceptButton)
 9	T.SkinCloseButton(TabardFrameCloseButton)
10	T.SkinRotateButton(TabardCharacterModelRotateLeftButton)
11	T.SkinRotateButton(TabardCharacterModelRotateRightButton)
12	TabardFrameCostFrame:StripTextures()
13	TabardFrameCustomizationFrame:StripTextures()
14
15	for i=1, 5 do
16		local custom = "TabardFrameCustomization"..i
17		_G[custom]:StripTextures()
18		T.SkinNextPrevButton(_G[custom.."LeftButton"])
19		T.SkinNextPrevButton(_G[custom.."RightButton"])
20		
21		
22		if i > 1 then
23			_G[custom]:ClearAllPoints()
24			_G[custom]:Point("TOP", _G["TabardFrameCustomization"..i-1], "BOTTOM", 0, -6)
25		else
26			local point, anchor, point2, x, y = _G[custom]:GetPoint()
27			_G[custom]:Point(point, anchor, point2, x, y+4)
28		end
29	end
30
31	TabardCharacterModelRotateLeftButton:Point("BOTTOMLEFT", 4, 4)
32	TabardCharacterModelRotateRightButton:Point("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0)
33	TabardCharacterModelRotateLeftButton.SetPoint = T.dummy
34	TabardCharacterModelRotateRightButton.SetPoint = T.dummy
35end
36
37tinsert(T.SkinFuncs["Tukui"], LoadSkin)