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

/Tukui/modules/skins/glyph.lua

http://github.com/Asphyxia/Tukui
Lua | 69 lines | 53 code | 15 blank | 1 comment | 6 complexity | c623c4e7fdd38d521b30691e8f9998da MD5 | raw file
 1local T, C, L = unpack(select(2, ...))
 2
 3local function LoadSkin()
 4	--GLYPHS TAB
 5	GlyphFrameSparkleFrame:CreateBackdrop("Transparent")
 6	GlyphFrameSparkleFrame.backdrop:Point( "TOPLEFT", GlyphFrameSparkleFrame, "TOPLEFT", 3, -3 )
 7	GlyphFrameSparkleFrame.backdrop:Point( "BOTTOMRIGHT", GlyphFrameSparkleFrame, "BOTTOMRIGHT", -3, 3 )
 8	T.SkinEditBox(GlyphFrameSearchBox)
 9	T.SkinDropDownBox(GlyphFrameFilterDropDown, 212)
10	
11	GlyphFrameBackground:SetParent(GlyphFrameSparkleFrame)
12	GlyphFrameBackground:SetPoint("TOPLEFT", 4, -4)
13	GlyphFrameBackground:SetPoint("BOTTOMRIGHT", -4, 4)
14	
15	for i=1, 9 do
16		_G["GlyphFrameGlyph"..i]:SetFrameLevel(_G["GlyphFrameGlyph"..i]:GetFrameLevel() + 5)
17	end
18	
19	for i=1, 3 do
20		_G["GlyphFrameHeader"..i]:StripTextures()
21	end
22
23	local function Glyphs(self, first, i)
24		local button = _G["GlyphFrameScrollFrameButton"..i]
25		local icon = _G["GlyphFrameScrollFrameButton"..i.."Icon"]
26
27		if first then
28			button:StripTextures()
29		end
30
31		if icon then
32			icon:SetTexCoord(.08, .92, .08, .92)
33			T.SkinButton(button)
34		end
35	end
36
37	for i=1, 10 do
38		Glyphs(nil, true, i)
39	end
40
41	GlyphFrameClearInfoFrameIcon:SetTexCoord(.08, .92, .08, .92)
42	GlyphFrameClearInfoFrameIcon:ClearAllPoints()
43	GlyphFrameClearInfoFrameIcon:Point("TOPLEFT", 2, -2)
44	GlyphFrameClearInfoFrameIcon:Point("BOTTOMRIGHT", -2, 2)
45	
46	GlyphFrameClearInfoFrame:CreateBackdrop("Transparent", true)
47	GlyphFrameClearInfoFrame.backdrop:SetAllPoints()
48	GlyphFrameClearInfoFrame:StyleButton()
49	GlyphFrameClearInfoFrame:Size(25, 25)
50	
51	GlyphFrame.levelOverlay1:SetParent(GlyphFrameSparkleFrame)
52	GlyphFrame.levelOverlayText1:SetParent(GlyphFrameSparkleFrame)
53	GlyphFrame.levelOverlay2:SetParent(GlyphFrameSparkleFrame)
54	GlyphFrame.levelOverlayText2:SetParent(GlyphFrameSparkleFrame)
55	
56	T.SkinScrollBar(GlyphFrameScrollFrameScrollBar, 5)
57
58	local StripAllTextures = {
59		"GlyphFrameScrollFrame",
60		"GlyphFrameSideInset",
61		"GlyphFrameScrollFrameScrollChild",
62	}
63
64	for _, object in pairs(StripAllTextures) do
65		_G[object]:StripTextures()
66	end
67end
68
69T.SkinFuncs["Blizzard_GlyphUI"] = LoadSkin