PageRenderTime 83ms CodeModel.GetById 40ms app.highlight 9ms RepoModel.GetById 31ms app.codeStats 1ms

/Tukui/modules/skins/pvp.lua

http://github.com/Asphyxia/Tukui
Lua | 158 lines | 138 code | 18 blank | 2 comment | 9 complexity | 7c867b0ccdc897db469c628dbdc9e3c6 MD5 | raw file
  1local T, C, L = unpack(select(2, ...))
  2
  3local function LoadSkin()
  4	local buttons = {
  5		"PVPFrameLeftButton",
  6		"PVPFrameRightButton",
  7		"PVPColorPickerButton1",
  8		"PVPColorPickerButton2",
  9		"PVPColorPickerButton3",
 10		"PVPBannerFrameAcceptButton",
 11	}
 12
 13	for i = 1, #buttons do
 14		_G[buttons[i]]:StripTextures()
 15		T.SkinButton(_G[buttons[i]])
 16	end
 17
 18	local KillTextures = {
 19		"PVPHonorFrameBGTex",
 20		"PVPHonorFrameInfoScrollFrameScrollBar",
 21		"PVPConquestFrameInfoButtonInfoBG",
 22		"PVPConquestFrameInfoButtonInfoBGOff",
 23		"PVPTeamManagementFrameFlag2GlowBG",
 24		"PVPTeamManagementFrameFlag3GlowBG",
 25		"PVPTeamManagementFrameFlag5GlowBG",
 26		"PVPTeamManagementFrameFlag2HeaderSelected",
 27		"PVPTeamManagementFrameFlag3HeaderSelected",
 28		"PVPTeamManagementFrameFlag5HeaderSelected",
 29		"PVPTeamManagementFrameFlag2Header",
 30		"PVPTeamManagementFrameFlag3Header",
 31		"PVPTeamManagementFrameFlag5Header",
 32		"PVPTeamManagementFrameWeeklyDisplayLeft",
 33		"PVPTeamManagementFrameWeeklyDisplayRight",
 34		"PVPTeamManagementFrameWeeklyDisplayMiddle",
 35		"PVPBannerFramePortrait",
 36		"PVPBannerFramePortraitFrame",
 37		"PVPBannerFrameInset",
 38		"PVPBannerFrameEditBoxLeft",
 39		"PVPBannerFrameEditBoxRight",
 40		"PVPBannerFrameEditBoxMiddle",
 41		"PVPBannerFrameCancelButton_LeftSeparator",
 42	}
 43
 44	for _, texture in pairs(KillTextures) do
 45		_G[texture]:Kill()
 46	end
 47
 48	local StripAllTextures = {
 49		"PVPFrame",
 50		"PVPFrameInset",
 51		"PVPHonorFrame",
 52		"PVPConquestFrame",
 53		"PVPTeamManagementFrame",
 54		"PVPHonorFrameTypeScrollFrame",
 55		"PVPFrameTopInset",
 56		"PVPTeamManagementFrameInvalidTeamFrame",
 57		"PVPBannerFrame",
 58		"PVPBannerFrameCustomization1",
 59		"PVPBannerFrameCustomization2",
 60		"PVPBannerFrameCustomizationFrame",
 61	}
 62
 63	for _, object in pairs(StripAllTextures) do
 64		_G[object]:StripTextures()
 65	end
 66
 67	local function ArenaHeader(self, first, i)
 68		local button = _G["PVPTeamManagementFrameHeader"..i]
 69
 70		if first then
 71			button:StripTextures()
 72		end
 73	end
 74
 75	for i=1, 4 do
 76		ArenaHeader(nil, true, i)
 77	end
 78	
 79	T.SkinScrollBar(PVPHonorFrameTypeScrollFrameScrollBar)
 80
 81	PVPBannerFrameEditBox:CreateBackdrop("Transparent")
 82	PVPBannerFrameEditBox.backdrop:Point( "TOPLEFT", PVPBannerFrameEditBox, "TOPLEFT" ,-5,-5)
 83	PVPBannerFrameEditBox.backdrop:Point( "BOTTOMRIGHT", PVPBannerFrameEditBox, "BOTTOMRIGHT",5,5)
 84	PVPHonorFrameInfoScrollFrameChildFrameDescription:SetTextColor(1,1,1)
 85	PVPHonorFrameInfoScrollFrameChildFrameRewardsInfo.description:SetTextColor(1,1,1)
 86	PVPTeamManagementFrameInvalidTeamFrame:CreateBackdrop("Transparent")
 87	PVPTeamManagementFrameInvalidTeamFrame:SetFrameLevel(PVPTeamManagementFrameInvalidTeamFrame:GetFrameLevel()+1)
 88	PVPTeamManagementFrameInvalidTeamFrame.backdrop:Point( "TOPLEFT", PVPTeamManagementFrameInvalidTeamFrame, "TOPLEFT")
 89	PVPTeamManagementFrameInvalidTeamFrame.backdrop:Point( "BOTTOMRIGHT", PVPTeamManagementFrameInvalidTeamFrame, "BOTTOMRIGHT")
 90	PVPTeamManagementFrameInvalidTeamFrame.backdrop:SetFrameLevel(PVPTeamManagementFrameInvalidTeamFrame:GetFrameLevel())
 91
 92	PVPFrameConquestBarLeft:Kill()
 93	PVPFrameConquestBarRight:Kill()
 94	PVPFrameConquestBarMiddle:Kill()
 95	PVPFrameConquestBarBG:Kill()
 96	PVPFrameConquestBarShadow:Kill()
 97	PVPFrameConquestBar.progress:SetTexture(C["media"].normTex)
 98	PVPFrameConquestBar:CreateBackdrop("Transparent")
 99	PVPFrameConquestBar.backdrop:Point("TOPLEFT", PVPFrameConquestBar.progress, "TOPLEFT", -2, 2)
100	PVPFrameConquestBar.backdrop:Point("BOTTOMRIGHT", PVPFrameConquestBar, "BOTTOMRIGHT", -2, 2) 
101
102	PVPBannerFrame:CreateBackdrop("Transparent")
103	PVPBannerFrame.backdrop:Point( "TOPLEFT", PVPBannerFrame, "TOPLEFT")
104	PVPBannerFrame.backdrop:Point( "BOTTOMRIGHT", PVPBannerFrame, "BOTTOMRIGHT")
105	PVPBannerFrameCustomization1:CreateBackdrop("Transparent")
106	PVPBannerFrameCustomization1.backdrop:Point( "TOPLEFT", PVPBannerFrameCustomization1LeftButton, "TOPRIGHT" ,2,0)
107	PVPBannerFrameCustomization1.backdrop:Point( "BOTTOMRIGHT", PVPBannerFrameCustomization1RightButton, "BOTTOMLEFT",-2,0)
108	PVPBannerFrameCustomization2:CreateBackdrop("Transparent")
109	PVPBannerFrameCustomization2.backdrop:Point( "TOPLEFT", PVPBannerFrameCustomization2LeftButton, "TOPRIGHT",2,0)
110	PVPBannerFrameCustomization2.backdrop:Point( "BOTTOMRIGHT", PVPBannerFrameCustomization2RightButton, "BOTTOMLEFT",-2,0)
111	T.SkinCloseButton(PVPBannerFrameCloseButton,PVPBannerFrame)
112	T.SkinNextPrevButton(PVPBannerFrameCustomization1LeftButton)
113	PVPBannerFrameCustomization1LeftButton:Height(PVPBannerFrameCustomization1:GetHeight())
114	T.SkinNextPrevButton(PVPBannerFrameCustomization1RightButton)
115	PVPBannerFrameCustomization1RightButton:Height(PVPBannerFrameCustomization1:GetHeight())
116	T.SkinNextPrevButton(PVPBannerFrameCustomization2LeftButton)
117	PVPBannerFrameCustomization2LeftButton:Height(PVPBannerFrameCustomization1:GetHeight())
118	T.SkinNextPrevButton(PVPBannerFrameCustomization2RightButton)
119	PVPBannerFrameCustomization2RightButton:Height(PVPBannerFrameCustomization1:GetHeight())
120	PVPFrame:CreateBackdrop("Transparent")
121	PVPFrame.backdrop:Point( "TOPLEFT", PVPFrame, "TOPLEFT")
122	PVPFrame.backdrop:Point( "BOTTOMRIGHT", PVPFrame, "BOTTOMRIGHT")
123	T.SkinCloseButton(PVPFrameCloseButton,PVPFrame)
124	T.SkinNextPrevButton(PVPTeamManagementFrameWeeklyToggleLeft)
125	T.SkinNextPrevButton(PVPTeamManagementFrameWeeklyToggleRight)
126	PVPColorPickerButton1:Height(PVPColorPickerButton1:GetHeight()-5)
127	PVPColorPickerButton2:Height(PVPColorPickerButton1:GetHeight())
128	PVPColorPickerButton3:Height(PVPColorPickerButton1:GetHeight())
129
130	--War Games
131	T.SkinButton(WarGameStartButton, true)
132	WarGamesFrame:StripTextures()
133	T.SkinScrollBar(WarGamesFrameScrollFrameScrollBar, 5)
134		
135	WarGameStartButton:ClearAllPoints()
136	WarGameStartButton:Point("LEFT", PVPFrameLeftButton, "RIGHT", 2, 0)
137	WarGamesFrameDescription:SetTextColor(1, 1, 1)
138
139	--Freaking gay Cancel Button FFSlocal
140	local f = PVPBannerFrameCancelButton
141	local l = _G[f:GetName().."Left"]
142	local m = _G[f:GetName().."Middle"]
143	local r = _G[f:GetName().."Right"]
144	if l then l:SetAlpha(0) end
145	if m then m:SetAlpha(0) end
146	if r then r:SetAlpha(0) end
147	f:CreateBackdrop("Transparent")
148	f:SetFrameLevel(PVPBannerFrameAcceptButton:GetFrameLevel()+1)
149	f.backdrop:Point( "TOPLEFT", PVPBannerFrameAcceptButton, "TOPLEFT", PVPBannerFrame:GetWidth()-PVPBannerFrameAcceptButton:GetWidth()-10,0)
150	f.backdrop:Point( "BOTTOMRIGHT", PVPBannerFrameAcceptButton, "BOTTOMRIGHT", PVPBannerFrame:GetWidth()-PVPBannerFrameAcceptButton:GetWidth()-10, 0)
151	f.backdrop:SetFrameLevel(f:GetFrameLevel()-1)
152
153	for i=1,4 do
154		T.SkinTab(_G["PVPFrameTab"..i])
155	end			
156end
157
158tinsert(T.SkinFuncs["Tukui"], LoadSkin)