PageRenderTime 11ms CodeModel.GetById 7ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Tukui/modules/skins/binding.lua

http://github.com/Asphyxia/Tukui
Lua | 38 lines | 32 code | 6 blank | 0 comment | 2 complexity | 8f3fb1df29c3e82d59955ec145a22f67 MD5 | raw file
 1local T, C, L = unpack(select(2, ...))
 2
 3local function LoadSkin()
 4	local buttons = {
 5		"KeyBindingFrameDefaultButton",
 6		"KeyBindingFrameUnbindButton",
 7		"KeyBindingFrameOkayButton",
 8		"KeyBindingFrameCancelButton",
 9	}
10	
11	for _, v in pairs(buttons) do
12		_G[v]:StripTextures()
13		_G[v]:SetTemplate("Transparent", true)
14	end
15	
16	T.SkinCheckBox(KeyBindingFrameCharacterButton)
17	KeyBindingFrameHeaderText:ClearAllPoints()
18	T.SkinScrollBar(KeyBindingFrameScrollFrameScrollBar)
19	KeyBindingFrameHeaderText:Point("TOP", KeyBindingFrame, "TOP", 0, -4)
20	KeyBindingFrame:StripTextures()
21	KeyBindingFrame:SetTemplate("Transparent")
22	
23	for i = 1, KEY_BINDINGS_DISPLAYED  do
24		local button1 = _G["KeyBindingFrameBinding"..i.."Key1Button"]
25		local button2 = _G["KeyBindingFrameBinding"..i.."Key2Button"]
26		button1:StripTextures(true)
27		button1:StyleButton(false)
28		button1:SetTemplate("Transparent", true)
29		button2:StripTextures(true)
30		button2:StyleButton(false)
31		button2:SetTemplate("Transparent", true)
32	end
33	
34	KeyBindingFrameUnbindButton:Point("RIGHT", KeyBindingFrameOkayButton, "LEFT", -3, 0)
35	KeyBindingFrameOkayButton:Point("RIGHT", KeyBindingFrameCancelButton, "LEFT", -3, 0)
36end
37
38T.SkinFuncs["Blizzard_BindingUI"] = LoadSkin