PageRenderTime 15ms CodeModel.GetById 10ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Tukui/modules/skins/lfr.lua

http://github.com/Asphyxia/Tukui
Lua | 70 lines | 54 code | 14 blank | 2 comment | 7 complexity | 3b4bb0678f3274a7f82f8ac8b10c3969 MD5 | raw file
 1local T, C, L = unpack(select(2, ...))
 2
 3local function LoadSkin()
 4	local buttons = {
 5	  "LFRQueueFrameFindGroupButton",
 6	  "LFRQueueFrameAcceptCommentButton",
 7	  "LFRBrowseFrameSendMessageButton",
 8	  "LFRBrowseFrameInviteButton",
 9	  "LFRBrowseFrameRefreshButton",
10	}
11
12	LFRParentFrame:StripTextures()
13	LFRParentFrame:SetTemplate("Transparent")
14	LFRQueueFrame:StripTextures()
15	LFRBrowseFrame:StripTextures()
16
17
18	for i=1, #buttons do
19	  T.SkinButton(_G[buttons[i]])
20	end
21
22	--Close button doesn't have a fucking name, extreme hackage
23	for i=1, LFRParentFrame:GetNumChildren() do
24	  local child = select(i, LFRParentFrame:GetChildren())
25	  if child.GetPushedTexture and child:GetPushedTexture() and not child:GetName() then
26		T.SkinCloseButton(child)
27	  end
28	end
29
30	T.SkinTab(LFRParentFrameTab1)
31	T.SkinTab(LFRParentFrameTab2)
32
33	T.SkinDropDownBox(LFRBrowseFrameRaidDropDown)
34
35	for i=1, 20 do
36	  local button = _G["LFRQueueFrameSpecificListButton"..i.."ExpandOrCollapseButton"]
37
38	  if button then
39		button:HookScript("OnClick", function()
40		  T.SkinCloseButton(button)
41		end)
42		T.SkinCloseButton(button)
43	  end
44	end
45
46	LFRQueueFrameCommentTextButton:CreateBackdrop("Transparent")
47	LFRQueueFrameCommentTextButton:Height(35)
48
49	for i=1, 7 do
50		local button = "LFRBrowseFrameColumnHeader"..i
51		_G[button.."Left"]:Kill()
52		_G[button.."Middle"]:Kill()
53		_G[button.."Right"]:Kill()
54	end		
55
56	for i=1, NUM_LFR_CHOICE_BUTTONS do
57		local button = _G["LFRQueueFrameSpecificListButton"..i]
58		T.SkinCheckBox(button.enableButton)
59	end
60
61	--DPS, Healer, Tank check button's don't have a name, use it's parent as a referance.
62	T.SkinCheckBox(LFRQueueFrameRoleButtonTank:GetChildren())
63	T.SkinCheckBox(LFRQueueFrameRoleButtonHealer:GetChildren())
64	T.SkinCheckBox(LFRQueueFrameRoleButtonDPS:GetChildren())
65	LFRQueueFrameRoleButtonTank:GetChildren():SetFrameLevel(LFRQueueFrameRoleButtonTank:GetChildren():GetFrameLevel() + 2)
66	LFRQueueFrameRoleButtonHealer:GetChildren():SetFrameLevel(LFRQueueFrameRoleButtonHealer:GetChildren():GetFrameLevel() + 2)
67	LFRQueueFrameRoleButtonDPS:GetChildren():SetFrameLevel(LFRQueueFrameRoleButtonDPS:GetChildren():GetFrameLevel() + 2)
68end
69
70tinsert(T.SkinFuncs["Tukui"], LoadSkin)