Skip to content

Commit

Permalink
"New" Classic LFG Frame Skin
Browse files Browse the repository at this point in the history
  • Loading branch information
Luckyone961 committed Nov 15, 2024
1 parent da80237 commit 004fc43
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 1 deletion.
144 changes: 144 additions & 0 deletions ElvUI/Classic/Modules/Skins/LFG.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
local E, L, V, P, G = unpack(ElvUI)
local S = E:GetModule('Skins')
local TT = E:GetModule('Tooltip')

local _G = _G
local pairs, next = pairs, next
local hooksecurefunc = hooksecurefunc

local function LFGTabs()
_G.LFGParentFrameTab1:ClearAllPoints()
_G.LFGParentFrameTab1:Point('TOPLEFT', _G.LFGParentFrame, 'BOTTOMLEFT', 1, 72)
_G.LFGParentFrameTab2:ClearAllPoints()
_G.LFGParentFrameTab2:Point('LEFT', _G.LFGParentFrameTab1, 'RIGHT', -19
, 0)
end

function S:Blizzard_GroupFinder_VanillaStyle()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.lfg) then return end

-- Main Frame and both Tabs
_G.LFGParentFramePortrait:Kill()
_G.LFGListingFrameActivityViewBarLeft:StripTextures()
_G.LFGListingFrameActivityViewBarMiddle:StripTextures()
_G.LFGListingFrameActivityViewBarRight:StripTextures()

local LFGListingFrame = _G.LFGListingFrame
S:HandleFrame(LFGListingFrame, true, nil, 11, -12, -30, 72)
LFGListingFrame:HookScript('OnShow', LFGTabs)

local LFGBrowseFrame = _G.LFGBrowseFrame
S:HandleFrame(LFGBrowseFrame, true, nil, 11, -12, -30, 72)
LFGBrowseFrame:HookScript('OnShow', LFGTabs)

S:HandleTrimScrollBar(_G.LFGListingFrameActivityViewScrollBar)

-- Mouseover Tooltip
if E.private.skins.blizzard.tooltip then
TT:SetStyle(_G.LFGBrowseSearchEntryTooltip)
end

-- Buttons
local buttons = {
_G.LFGListingFrameBackButton,
_G.LFGListingFramePostButton,
_G.LFGBrowseFrameSendMessageButton,
_G.LFGBrowseFrameGroupInviteButton
}

for _, button in pairs(buttons) do
S:HandleButton(button)
end

_G.LFGListingFrameBackButton:ClearAllPoints()
_G.LFGListingFrameBackButton:Point('TOPLEFT', _G.LFGParentFrameTab1, 'TOPLEFT', 14, 24)
_G.LFGBrowseFrameSendMessageButton:ClearAllPoints()
_G.LFGBrowseFrameSendMessageButton:Point('TOPLEFT', _G.LFGParentFrameTab1, 'TOPLEFT', 14, 24)

_G.LFGListingFramePostButton:Point('BOTTOMRIGHT', LFGListingFrame, 'BOTTOMRIGHT', -40, 76)
_G.LFGBrowseFrameGroupInviteButton:Point('BOTTOMRIGHT', LFGBrowseFrame, 'BOTTOMRIGHT', -40, 76)

_G.LFGBrowseFrameActivityDropDown.ResetButton:ClearAllPoints()
_G.LFGBrowseFrameActivityDropDown.ResetButton:Point('TOPRIGHT', _G.LFGBrowseFrameActivityDropDown, 'TOPRIGHT', 0, 12)

-- CheckBoxes
local checkBoxes = {
_G.LFGListingFrameSoloRoleButtonsRoleButtonTank.CheckButton,
_G.LFGListingFrameSoloRoleButtonsRoleButtonHealer.CheckButton,
_G.LFGListingFrameSoloRoleButtonsRoleButtonDPS.CheckButton,
_G.LFGListingFrameNewPlayerFriendlyButton.CheckButton,
}

for _, checkbox in pairs(checkBoxes) do
S:HandleCheckBox(checkbox, nil, nil, true)
end

S:HandleButton(_G.LFGListingFrameGroupRoleButtonsInitiateRolePoll)

S:HandleEditBox(_G.LFGListingComment)

-- DropDowns
S:HandleDropDownBox(_G.LFGListingFrameGroupRoleButtonsRoleDropDown, 180)
S:HandleDropDownBox(_G.LFGBrowseFrameActivityDropDown, 180)
S:HandleDropDownBox(_G.LFGBrowseFrameCategoryDropDown, 140)

_G.LFGBrowseFrameCategoryDropDown:ClearAllPoints()
_G.LFGBrowseFrameCategoryDropDown:Point('TOPLEFT', _G.LFGParentFrame, 'TOPLEFT', 22, -90)
_G.LFGBrowseFrameActivityDropDown:ClearAllPoints()
_G.LFGBrowseFrameActivityDropDown:Point('LEFT', _G.LFGBrowseFrameCategoryDropDown, 'RIGHT', 4, 0)

-- Refresh
S:HandleButton(_G.LFGBrowseFrameRefreshButton)
_G.LFGBrowseFrameRefreshButton:Size(22, 22)
_G.LFGBrowseFrameRefreshButton:ClearAllPoints()
_G.LFGBrowseFrameRefreshButton:Point('BOTTOM', _G.LFGBrowseFrame.backdrop.Center, 'BOTTOM', 0, 4)

-- Role check popup
S:HandleFrame(_G.RolePollPopup)
S:HandleButton(_G.RolePollPopupAcceptButton)
S:HandleCloseButton(_G.RolePollPopupCloseButton)

S:HandleCheckBox(_G.RolePollPopupRoleButtonTank.checkButton)
S:HandleCheckBox(_G.RolePollPopupRoleButtonHealer.checkButton)
S:HandleCheckBox(_G.RolePollPopupRoleButtonDPS.checkButton)

do
local i = 1
local tab = _G['LFGParentFrameTab'..i]
while tab do
S:HandleTab(tab)
tab.IsSkinned = true

i = i + 1
tab = _G['LFGParentFrameTab'..i]
end
end

for _, child in next, { _G.LFGParentFrame:GetChildren() } do
if not child.IsSkinned and child:GetObjectType() == 'Button' then
child:ClearAllPoints()
child:Point('TOPRIGHT', -26, -6)

S:HandleCloseButton(child)
child.IsSkinned = true
end
end

hooksecurefunc('LFGListingActivityView_InitActivityButton', function(button, elementData)
S:HandleCheckBox(button.CheckButton, nil, true)
button.CheckButton:SetChecked(LFGListingFrame:IsActivitySelected(elementData.activityID))
button.CheckButton:SetCheckedTexture([[Interface\Buttons\UI-CheckBox-Check]])
end)

hooksecurefunc('LFGListingActivityView_InitActivityGroupButton', function(button, _, isCollapsed)
if isCollapsed then
button.ExpandOrCollapseButton:SetNormalTexture(E.Media.Textures.PlusButton)
else
button.ExpandOrCollapseButton:SetNormalTexture(E.Media.Textures.MinusButton)
end

S:HandleCheckBox(button.CheckButton, nil, true)
end)
end

S:AddCallbackForAddon('Blizzard_GroupFinder_VanillaStyle')
1 change: 1 addition & 0 deletions ElvUI/Classic/Modules/Skins/Load_Skins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<Script file='GuildRegistrar.lua'/>
<Script file='Help.lua'/>
<Script file='Inspect.lua'/>
<Script file='LFG.lua'/>
<Script file='Loot.lua'/>
<Script file='Macro.lua'/>
<Script file='Mail.lua'/>
Expand Down
2 changes: 1 addition & 1 deletion ElvUI_Options/Core/Skins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ local toggles = {
guildregistrar = L["Guild Registrar"],
help = L["Help Frame"],
inspect = L["Inspect"],
lfg = L["LFG_TITLE"],
loot = L["Loot Frame"],
macro = L["MACROS"],
mail = L["Mail Frame"],
Expand Down Expand Up @@ -61,7 +62,6 @@ if E.Cata or E.Retail then
toggles.encounterjournal = L["ENCOUNTER_JOURNAL"]
toggles.gbank = L["Guild Bank"]
toggles.pvp = L["PvP Frames"]
toggles.lfg = L["LFG_TITLE"]
end

if not E.Retail then
Expand Down

0 comments on commit 004fc43

Please sign in to comment.