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

/Tukui/modules/skins/timemanager.lua

http://github.com/Asphyxia/Tukui
Lua | 52 lines | 41 code | 11 blank | 0 comment | 0 complexity | 5411ffddb123f2c0ec08acf252f64858 MD5 | raw file
 1local T, C, L = unpack(select(2, ...))
 2
 3local function LoadSkin()
 4	TimeManagerFrame:StripTextures()
 5	TimeManagerFrame:SetTemplate("Transparent")
 6
 7	T.SkinCloseButton(TimeManagerCloseButton)
 8
 9	T.SkinDropDownBox(TimeManagerAlarmHourDropDown, 80)
10	T.SkinDropDownBox(TimeManagerAlarmMinuteDropDown, 80)
11	T.SkinDropDownBox(TimeManagerAlarmAMPMDropDown, 80)
12	
13	T.SkinEditBox(TimeManagerAlarmMessageEditBox)
14	
15	T.SkinButton(TimeManagerAlarmEnabledButton, true)
16	TimeManagerAlarmEnabledButton:HookScript("OnClick", function(self)
17		T.SkinButton(self)
18	end)
19
20	TimeManagerFrame:HookScript("OnShow", function(self)
21		T.SkinButton(TimeManagerAlarmEnabledButton)
22	end)		
23	
24	T.SkinCheckBox(TimeManagerMilitaryTimeCheck)
25	T.SkinCheckBox(TimeManagerLocalTimeCheck)
26	
27	TimeManagerStopwatchFrame:StripTextures()
28	TimeManagerStopwatchCheck:SetTemplate("Transparent")
29	TimeManagerStopwatchCheck:GetNormalTexture():SetTexCoord(.08, .92, .08, .92)
30	TimeManagerStopwatchCheck:GetNormalTexture():ClearAllPoints()
31	TimeManagerStopwatchCheck:GetNormalTexture():Point("TOPLEFT", 2, -2)
32	TimeManagerStopwatchCheck:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2)
33	local hover = TimeManagerStopwatchCheck:CreateTexture("frame", nil, TimeManagerStopwatchCheck) -- hover
34	hover:SetTexture(1,1,1,0.3)
35	hover:Point("TOPLEFT",TimeManagerStopwatchCheck,2,-2)
36	hover:Point("BOTTOMRIGHT",TimeManagerStopwatchCheck,-2,2)
37	TimeManagerStopwatchCheck:SetHighlightTexture(hover)
38	
39	StopwatchFrame:StripTextures()
40	StopwatchFrame:CreateBackdrop("Transparent")
41	StopwatchFrame.backdrop:Point("TOPLEFT", 0, -17)
42	StopwatchFrame.backdrop:Point("BOTTOMRIGHT", 0, 2)
43	
44	StopwatchTabFrame:StripTextures()
45	T.SkinCloseButton(StopwatchCloseButton)
46	T.SkinNextPrevButton(StopwatchPlayPauseButton)
47	T.SkinNextPrevButton(StopwatchResetButton)
48	StopwatchPlayPauseButton:Point("RIGHT", StopwatchResetButton, "LEFT", -4, 0)
49	StopwatchResetButton:Point("BOTTOMRIGHT", StopwatchFrame, "BOTTOMRIGHT", -4, 6)
50end
51
52T.SkinFuncs["Blizzard_TimeManager"] = LoadSkin