Skip to content
  • Sponsor tukui-org/ElvUI

  • Notifications You must be signed in to change notification settings
  • Fork 166

Commit d5be77f

Browse files
committedApr 22, 2024··
[WIP] Honor/Conquest/WarGames
1 parent fb072b6 commit d5be77f

File tree

1 file changed

+177
-82
lines changed

1 file changed

+177
-82
lines changed
 

‎ElvUI/Cata/Modules/Skins/PVP.lua

+177-82
Original file line numberDiff line numberDiff line change
@@ -6,101 +6,197 @@ local CreateFrame = CreateFrame
66
local MAX_ARENA_TEAMS = MAX_ARENA_TEAMS
77

88
function S:SkinPVPFrame()
9-
-- Honor/Arena/PvP Tab
9+
-- Honor, Conquest, War Games Frame
1010
local PVPFrame = _G.PVPFrame
11-
S:HandleFrame(PVPFrame, true, nil, 11, -12, -32, 76)
12-
S:HandleCloseButton(_G.PVPParentFrameCloseButton)
13-
_G.PVPParentFrameCloseButton:Point('TOPRIGHT', -26, -5)
14-
15-
for i = 1, MAX_ARENA_TEAMS do
16-
local pvpTeam = _G['PVPTeam'..i]
17-
18-
pvpTeam:StripTextures()
19-
pvpTeam:CreateBackdrop()
20-
pvpTeam.backdrop:Point('TOPLEFT', 9, -4)
21-
pvpTeam.backdrop:Point('BOTTOMRIGHT', -24, 3)
11+
S:HandleFrame(PVPFrame)
12+
PVPFrame:StripTextures()
13+
PVPFrame:SetTemplate('Transparent')
14+
15+
local buttons = {
16+
'PVPFrameLeftButton',
17+
'PVPFrameRightButton',
18+
'PVPColorPickerButton1',
19+
'PVPColorPickerButton2',
20+
'PVPColorPickerButton3',
21+
'PVPBannerFrameAcceptButton'
22+
}
23+
24+
for i = 1, #buttons do
25+
local button = _G[buttons[i]]
26+
27+
button:StripTextures()
28+
S:HandleButton(button)
29+
end
2230

23-
pvpTeam:HookScript('OnEnter', S.SetModifiedBackdrop)
24-
pvpTeam:HookScript('OnLeave', S.SetOriginalBackdrop)
31+
local Strip = {
32+
'PVPFrameInset',
33+
'PVPHonorFrame',
34+
'PVPFrameTopInset',
35+
'PVPConquestFrame'
36+
}
2537

26-
_G['PVPTeam'..i..'Highlight']:Kill()
38+
for _, strip in pairs(Strip) do
39+
_G[strip]:StripTextures()
2740
end
2841

29-
local PVPTeamDetails = _G.PVPTeamDetails
30-
PVPTeamDetails:StripTextures()
31-
PVPTeamDetails:SetTemplate('Transparent')
42+
-- Tons of leftover texture crap
43+
local KillTextures = {
44+
'PVPHonorFrameBGTex',
45+
'PVPHonorFrameInfoScrollFrameScrollBar',
46+
'PVPConquestFrameInfoButtonInfoBG',
47+
'PVPConquestFrameInfoButtonInfoBGOff',
48+
'PVPBannerFramePortrait',
49+
'PVPFrameConquestBarLeft',
50+
'PVPFrameConquestBarRight',
51+
'PVPFrameConquestBarMiddle',
52+
'PVPFrameConquestBarBG',
53+
'PVPFrameConquestBarShadow'
54+
}
55+
56+
for _, texture in pairs(KillTextures) do
57+
_G[texture]:Kill()
58+
end
3259

33-
local PVPFrameToggleButton = _G.PVPFrameToggleButton
34-
S:HandleNextPrevButton(PVPFrameToggleButton)
35-
PVPFrameToggleButton:Point('BOTTOMRIGHT', PVPFrame, 'BOTTOMRIGHT', -48, 81)
36-
PVPFrameToggleButton:Size(14)
60+
_G.PVPHonorFrameInfoScrollFrameChildFrameDescription:SetTextColor(1, 1, 1)
61+
_G.PVPHonorFrameInfoScrollFrameChildFrameRewardsInfo.description:SetTextColor(1, 1, 1)
62+
63+
S:HandleButtonHighlight(_G.PVPConquestFrameConquestButtonArena)
64+
S:HandleButtonHighlight(_G.PVPConquestFrameConquestButtonRated)
65+
66+
local PVPConquestFrameNoWeekly = _G.PVPConquestFrameNoWeekly
67+
PVPConquestFrameNoWeekly:StripTextures()
68+
PVPConquestFrameNoWeekly:CreateBackdrop()
69+
PVPConquestFrameNoWeekly.backdrop:Point('TOPLEFT', -5, 5)
70+
PVPConquestFrameNoWeekly.backdrop:Point('BOTTOMRIGHT', 8, -5)
71+
PVPConquestFrameNoWeekly.backdrop:SetFrameLevel(PVPConquestFrameNoWeekly:GetFrameLevel())
72+
73+
-- Conquest Bar
74+
local PVPFrameConquestBar = _G.PVPFrameConquestBar
75+
PVPFrameConquestBar:StripTextures()
76+
PVPFrameConquestBar:CreateBackdrop()
77+
PVPFrameConquestBar.backdrop:Point('TOPLEFT', PVPFrameConquestBar.progress, -1, 1)
78+
PVPFrameConquestBar.backdrop:Point('BOTTOMRIGHT', PVPFrameConquestBar, 3, 2)
79+
PVPFrameConquestBar:Point('LEFT', 40, 0)
80+
81+
PVPFrameConquestBar.progress:SetTexture(E.media.normTex)
82+
PVPFrameConquestBar.progress:Point('LEFT')
83+
84+
for i = 1, 2 do
85+
_G['PVPFrameConquestBarCap'..i]:SetTexture(E.media.normTex)
86+
_G['PVPFrameConquestBarCap'..i..'Marker']:Size(4, E.PixelMode and 14 or 12)
87+
_G['PVPFrameConquestBarCap'..i..'MarkerTexture']:SetTexture(1, 1, 1, 0.40)
88+
end
3789

38-
for i = 1, 5 do
39-
local header = _G['PVPTeamDetailsFrameColumnHeader'..i]
40-
header:StripTextures()
41-
header:StyleButton()
90+
PVPFrame:StripTextures()
91+
PVPFrame:SetTemplate('Transparent')
92+
93+
local PVPFrameLowLevelFrame = _G.PVPFrameLowLevelFrame
94+
PVPFrameLowLevelFrame:StripTextures()
95+
PVPFrameLowLevelFrame:CreateBackdrop()
96+
PVPFrameLowLevelFrame.backdrop:Point('TOPLEFT', -2, -40)
97+
PVPFrameLowLevelFrame.backdrop:Point('BOTTOMRIGHT', 5, 80)
98+
99+
-- PvP Icon
100+
if _G.PVPFrameCurrency then
101+
local PVPFrameCurrency = _G.PVPFrameCurrency
102+
PVPFrameCurrency:CreateBackdrop()
103+
PVPFrameCurrency:Size(32)
104+
PVPFrameCurrency:Point('TOP', 0, -26)
105+
106+
local PVPFrameCurrencyIcon = _G.PVPFrameCurrencyIcon
107+
PVPFrameCurrencyIcon:SetTexture('Interface\\Icons\\PVPCurrency-Honor-'..E.myfaction)
108+
PVPFrameCurrencyIcon.SetTexture = E.noop
109+
PVPFrameCurrencyIcon:SetTexCoord(unpack(E.TexCoords))
110+
PVPFrameCurrencyIcon:SetInside(PVPFrameCurrency.backdrop)
111+
112+
_G.PVPFrameCurrencyLabel:Hide()
113+
_G.PVPFrameCurrencyValue:Point('LEFT', PVPFrameCurrencyIcon, 'RIGHT', 6, 0)
42114
end
43115

44-
for i = 1, 10 do
45-
local button = _G['PVPTeamDetailsButton'..i]
46-
button:Width(335)
47-
S:HandleButtonHighlight(button)
116+
-- Rewards
117+
for _, frame in pairs({'PVPHonorFrameInfoScrollFrameChildFrameRewardsInfoWinReward', 'PVPHonorFrameInfoScrollFrameChildFrameRewardsInfoLossReward', 'PVPConquestFrameWinReward'}) do
118+
local background = _G[frame]:GetRegions()
119+
background:SetTexture(E.Media.Textures.Highlight)
120+
if _G[frame] == PVPHonorFrameInfoScrollFrameChildFrameRewardsInfoWinReward or _G[frame] == PVPConquestFrameWinReward then
121+
background:SetVertexColor(0, 0.439, 0, 0.5)
122+
else
123+
background:SetVertexColor(0.5608, 0, 0, 0.5)
124+
end
125+
126+
if _G[frame] ~= PVPConquestFrameWinReward then
127+
local honor = _G[frame..'HonorSymbol']
128+
honor:SetTexture('Interface\\Icons\\PVPCurrency-Honor-'..E.myfaction)
129+
honor.SetTexture = E.noop
130+
honor:SetTexCoord(unpack(E.TexCoords))
131+
honor:Size(30)
132+
end
133+
134+
local conquest = _G[frame..'ArenaSymbol']
135+
conquest:SetTexture('Interface\\Icons\\PVPCurrency-Conquest-'..E.myfaction)
136+
conquest.SetTexture = E.noop
137+
conquest:SetTexCoord(unpack(E.TexCoords))
138+
conquest:Size(30)
48139
end
49140

50-
-- BG Queue Tabs
51-
S:HandleTab(_G.PVPParentFrameTab1)
52-
S:HandleTab(_G.PVPParentFrameTab2)
141+
-- War Games
142+
_G.WarGamesFrame:StripTextures()
143+
_G.WarGamesFrameDescription:SetTextColor(1, 1, 1)
53144

54-
-- Reposition Tabs
55-
_G.PVPParentFrameTab1:ClearAllPoints()
56-
_G.PVPParentFrameTab1:Point('TOPLEFT', _G.PVPParentFrame, 'BOTTOMLEFT', 1, 76)
57-
_G.PVPParentFrameTab2:Point('TOPLEFT', _G.PVPParentFrameTab1, 'TOPRIGHT', -19, 0)
145+
local WarGameStartButton = _G.WarGameStartButton
146+
S:HandleButton(WarGameStartButton, true)
147+
WarGameStartButton:ClearAllPoints()
148+
WarGameStartButton:Point('LEFT', _G.PVPFrameLeftButton, 'RIGHT', 2, 0)
58149

59-
S:HandleButton(_G.PVPTeamDetailsAddTeamMember)
60-
S:HandleNextPrevButton(_G.PVPTeamDetailsToggleButton)
61-
S:HandleCloseButton(_G.PVPTeamDetailsCloseButton)
62-
end
150+
-- Create Arena Team
151+
local PVPBannerFrame = _G.PVPBannerFrame
152+
PVPBannerFrame:StripTextures()
153+
PVPBannerFrame:SetTemplate('Transparent')
154+
155+
_G.PVPBannerFrameCustomizationFrame:StripTextures()
156+
157+
local PVPBannerFrameCustomization1 = _G.PVPBannerFrameCustomization1
158+
PVPBannerFrameCustomization1:StripTextures()
159+
PVPBannerFrameCustomization1:CreateBackdrop()
160+
PVPBannerFrameCustomization1.backdrop:Point('TOPLEFT', _G.PVPBannerFrameCustomization1LeftButton, 'TOPRIGHT', 2, 0)
161+
PVPBannerFrameCustomization1.backdrop:Point('BOTTOMRIGHT', _G.PVPBannerFrameCustomization1RightButton, 'BOTTOMLEFT', -2, 0)
63162

64-
function S:SkinBattlefield()
65-
-- Main Frame
66-
local BattlefieldFrame = _G.BattlefieldFrame
67-
BattlefieldFrame:StripTextures(true)
68-
S:HandleFrame(BattlefieldFrame, true, nil, 11, -12, -32, 76)
69-
70-
_G.BattlefieldFrameInfoScrollFrameChildFrameRewardsInfoDescription:SetTextColor(1, 1, 1)
71-
_G.BattlefieldFrameInfoScrollFrameChildFrameDescription:SetTextColor(1, 1, 1)
72-
73-
S:HandleButton(_G.BattlefieldFrameCancelButton)
74-
S:HandleButton(_G.BattlefieldFrameJoinButton)
75-
S:HandleButton(_G.BattlefieldFrameGroupJoinButton)
76-
77-
_G.BattlefieldFrameGroupJoinButton:Point('RIGHT', _G.BattlefieldFrameJoinButton, 'LEFT', -2, 0)
78-
79-
_G.BattlefieldFrameTypeScrollFrame:StripTextures()
80-
S:HandleScrollBar(_G.BattlefieldFrameTypeScrollFrameScrollBar)
81-
82-
local backdrop_level = BattlefieldFrame.backdrop:GetFrameLevel()
83-
84-
-- Custom Backdrop 1
85-
local topBackdrop = CreateFrame('Frame', nil, BattlefieldFrame)
86-
topBackdrop:SetTemplate('Transparent')
87-
topBackdrop:Height(130)
88-
topBackdrop:Width(330)
89-
topBackdrop:Point('TOP', BattlefieldFrame, 'TOP', -12, -38)
90-
topBackdrop:SetFrameLevel(backdrop_level)
91-
BattlefieldFrame.TopBackdrop = topBackdrop
92-
93-
-- Custom Backdrop 2
94-
local bottomBackdrop = CreateFrame('Frame', nil, BattlefieldFrame)
95-
bottomBackdrop:SetTemplate('Transparent')
96-
bottomBackdrop:Height(230)
97-
bottomBackdrop:Width(330)
98-
bottomBackdrop:Point('BOTTOM', BattlefieldFrame, 'BOTTOM', -12, 110)
99-
bottomBackdrop:SetFrameLevel(backdrop_level)
100-
BattlefieldFrame.BottomBackdrop = bottomBackdrop
101-
102-
S:HandleCloseButton(_G.BattlefieldFrameCloseButton)
103-
_G.BattlefieldFrameCloseButton:Point('TOPRIGHT', -26, -5)
163+
PVPBannerFrameCustomization2:StripTextures()
164+
PVPBannerFrameCustomization2:CreateBackdrop()
165+
PVPBannerFrameCustomization2.backdrop:Point('TOPLEFT', _G.PVPBannerFrameCustomization2LeftButton, 'TOPRIGHT', 2, 0)
166+
PVPBannerFrameCustomization2.backdrop:Point('BOTTOMRIGHT', _G.PVPBannerFrameCustomization2RightButton, 'BOTTOMLEFT', -2, 0)
167+
168+
S:HandleCloseButton(_G.PVPBannerFrameCloseButton, PVPBannerFrame)
169+
S:HandleCloseButton(_G.PVPFrameCloseButton, PVPFrame)
170+
171+
S:HandleNextPrevButton(_G.PVPBannerFrameCustomization1LeftButton)
172+
_G.PVPBannerFrameCustomization1LeftButton:Height(20)
173+
174+
S:HandleNextPrevButton(_G.PVPBannerFrameCustomization1RightButton)
175+
_G.PVPBannerFrameCustomization1RightButton:Height(20)
176+
177+
S:HandleNextPrevButton(_G.PVPBannerFrameCustomization2LeftButton)
178+
_G.PVPBannerFrameCustomization2LeftButton:Height(20)
179+
180+
S:HandleNextPrevButton(_G.PVPBannerFrameCustomization2RightButton)
181+
_G.PVPBannerFrameCustomization2RightButton:Height(20)
182+
183+
_G.PVPColorPickerButton1:Height(20)
184+
_G.PVPColorPickerButton2:Height(20)
185+
_G.PVPColorPickerButton3:Height(20)
186+
187+
local PVPBannerFrameCancelButton = _G.PVPBannerFrameCancelButton
188+
S:HandleButton(PVPBannerFrameCancelButton)
189+
PVPBannerFrameCancelButton.backdrop = CreateFrame('Frame', nil, PVPBannerFrameCancelButton)
190+
PVPBannerFrameCancelButton.backdrop:SetTemplate('Default', true)
191+
PVPBannerFrameCancelButton.backdrop:SetFrameLevel(PVPBannerFrameCancelButton:GetFrameLevel() - 2)
192+
PVPBannerFrameCancelButton.backdrop:Point('TOPLEFT', _G.PVPBannerFrameAcceptButton, 248, 0)
193+
PVPBannerFrameCancelButton.backdrop:Point('BOTTOMRIGHT', _G.PVPBannerFrameAcceptButton, 248, 0)
194+
195+
-- Reposition Tabs
196+
_G.PVPFrameTab1:ClearAllPoints()
197+
_G.PVPFrameTab1:Point('TOPLEFT', PVPFrame, 'BOTTOMLEFT', -10, 0)
198+
_G.PVPFrameTab2:Point('TOPLEFT', _G.PVPFrameTab1, 'TOPRIGHT', -19, 0)
199+
_G.PVPFrameTab3:Point('TOPLEFT', _G.PVPFrameTab2, 'TOPRIGHT', -19, 0)
104200
end
105201

106202
function S:SkinPVPReadyDialog()
@@ -115,7 +211,6 @@ function S:SkinPVP()
115211
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.pvp) then return end
116212

117213
S:SkinPVPFrame()
118-
S:SkinBattlefield()
119214
S:SkinPVPReadyDialog()
120215
end
121216

0 commit comments

Comments
 (0)
Please sign in to comment.