PageRenderTime 101ms CodeModel.GetById 60ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/Tukui/modules/skins/colorpicker.lua

http://github.com/Asphyxia/Tukui
Lua | 18 lines | 15 code | 2 blank | 1 comment | 6 complexity | 7f6dc27f441132c2432cea667db3fb22 MD5 | raw file
 1local T, C, L = unpack(select(2, ...))
 2
 3local function LoadSkin()
 4	ColorPickerFrame:CreateBackdrop("Transparent")
 5	T.SkinButton(ColorPickerOkayButton)
 6	T.SkinButton(ColorPickerCancelButton)
 7	ColorPickerOkayButton:ClearAllPoints()
 8	ColorPickerOkayButton:Point("RIGHT", ColorPickerCancelButton,"LEFT", -2, 0)
 9	-- we cant use StripTexture() here, doing it manually
10	for i=1, ColorPickerFrame:GetNumRegions() do
11		local region = select(i, ColorPickerFrame:GetRegions())
12		if region:GetObjectType() == "Texture" and (region:GetTexture() == "Interface\\DialogFrame\\UI-DialogBox-Border" or region:GetTexture() == "Interface\\DialogFrame\\UI-DialogBox-Background" or region:GetTexture() == "Interface\\DialogFrame\\UI-DialogBox-Header") then
13			region:SetTexture(nil)
14		end
15	end		
16end
17
18tinsert(T.SkinFuncs["Tukui"], LoadSkin)