PageRenderTime 102ms CodeModel.GetById 60ms app.highlight 4ms RepoModel.GetById 37ms app.codeStats 0ms

/Tukui/modules/skins/debugtools.lua

http://github.com/Asphyxia/Tukui
Lua | 55 lines | 47 code | 8 blank | 0 comment | 4 complexity | 5b65f3a2e4e76cdb73740f9eb57afc10 MD5 | raw file
 1local T, C, L = unpack(select(2, ...))
 2
 3local function LoadSkin()
 4	local noscalemult = T.mult * C["general"].uiscale
 5	local bg = {
 6	  bgFile = C["media"].blank, 
 7	  edgeFile = C["media"].blank, 
 8	  tile = false, tileSize = 0, edgeSize = noscalemult, 
 9	  insets = { left = -noscalemult, right = -noscalemult, top = -noscalemult, bottom = -noscalemult}
10	}
11	
12	ScriptErrorsFrame:SetBackdrop(bg)
13	ScriptErrorsFrame:SetBackdropColor(unpack(C.media.backdropcolor))
14	ScriptErrorsFrame:SetBackdropBorderColor(unpack(C.media.bordercolor))	
15
16	EventTraceFrame:SetTemplate("Transparent")
17	
18	local texs = {
19		"TopLeft",
20		"TopRight",
21		"Top",
22		"BottomLeft",
23		"BottomRight",
24		"Bottom",
25		"Left",
26		"Right",
27		"TitleBG",
28		"DialogBG",
29	}
30	
31	for i=1, #texs do
32		_G["ScriptErrorsFrame"..texs[i]]:SetTexture(nil)
33		_G["EventTraceFrame"..texs[i]]:SetTexture(nil)
34	end
35	
36	local bg = {
37	  bgFile = C["media"].normTex, 
38	  edgeFile = C["media"].blank, 
39	  tile = false, tileSize = 0, edgeSize = noscalemult, 
40	  insets = { left = -noscalemult, right = -noscalemult, top = -noscalemult, bottom = -noscalemult}
41	}
42	T.SkinScrollBar(ScriptErrorsFrameScrollFrameScrollBar)
43	for i=1, ScriptErrorsFrame:GetNumChildren() do
44		local child = select(i, ScriptErrorsFrame:GetChildren())
45		if child:GetObjectType() == "Button" and not child:GetName() then
46			
47			T.SkinButton(child)
48			child:SetBackdrop(bg)
49			child:SetBackdropColor(unpack(C.media.backdropcolor))
50			child:SetBackdropBorderColor(unpack(C.media.bordercolor))	
51		end
52	end	
53end
54
55T.SkinFuncs["Blizzard_DebugTools"] = LoadSkin