From 65e169372d5c618ee998c1236f42bb75ac6b8e8e Mon Sep 17 00:00:00 2001 From: Luckyone Date: Thu, 14 Nov 2024 11:06:42 +0100 Subject: [PATCH 01/14] Bump 1.15.5 TOC --- ElvUI/ElvUI_Vanilla.toc | 2 +- ElvUI_Libraries/ElvUI_Libraries_Vanilla.toc | 2 +- ElvUI_Options/ElvUI_Options_Vanilla.toc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ElvUI/ElvUI_Vanilla.toc b/ElvUI/ElvUI_Vanilla.toc index 87cc1a1ec2..aec694c9aa 100644 --- a/ElvUI/ElvUI_Vanilla.toc +++ b/ElvUI/ElvUI_Vanilla.toc @@ -6,7 +6,7 @@ ## SavedVariablesPerCharacter: ElvCharacterDB ## OptionalDeps: SharedMedia, Tukui, Masque ## RequiredDeps: ElvUI_Libraries -## Interface: 11504 +## Interface: 11505 ## X-Tukui-ProjectID: -2 ## X-Tukui-ProjectFolders: ElvUI, ElvUI_Libraries, ElvUI_Options diff --git a/ElvUI_Libraries/ElvUI_Libraries_Vanilla.toc b/ElvUI_Libraries/ElvUI_Libraries_Vanilla.toc index 2977bd97a2..ffe612c082 100644 --- a/ElvUI_Libraries/ElvUI_Libraries_Vanilla.toc +++ b/ElvUI_Libraries/ElvUI_Libraries_Vanilla.toc @@ -2,7 +2,7 @@ ## Notes: Libraries that power ElvUI ## Author: Elv, Simpy ## Version: @project-version@ -## Interface: 11504 +## Interface: 11505 ## OptionalDeps: LibHealComm-4.0 ## X-oUF: ElvUF diff --git a/ElvUI_Options/ElvUI_Options_Vanilla.toc b/ElvUI_Options/ElvUI_Options_Vanilla.toc index 444b6e53f3..3be23d12f5 100644 --- a/ElvUI_Options/ElvUI_Options_Vanilla.toc +++ b/ElvUI_Options/ElvUI_Options_Vanilla.toc @@ -2,7 +2,7 @@ ## Notes: Powers the configuration window.|n|cffff3333Does not store any profile data.|r ## Author: Elv, Simpy ## Version: @project-version@ -## Interface: 11504 +## Interface: 11505 ## RequiredDeps: ElvUI ## LoadOnDemand: 1 From 1c564bd0245d037acf393ded5c0f0533c5abe523 Mon Sep 17 00:00:00 2001 From: Luckyone Date: Thu, 14 Nov 2024 11:28:25 +0100 Subject: [PATCH 02/14] Guild Roster Tab --- ElvUI/Classic/Modules/Skins/Friends.lua | 141 +++++++++++++++++++++++- 1 file changed, 140 insertions(+), 1 deletion(-) diff --git a/ElvUI/Classic/Modules/Skins/Friends.lua b/ElvUI/Classic/Modules/Skins/Friends.lua index 81de00aace..49c40c2b48 100644 --- a/ElvUI/Classic/Modules/Skins/Friends.lua +++ b/ElvUI/Classic/Modules/Skins/Friends.lua @@ -6,10 +6,12 @@ local unpack, pairs = unpack, pairs local BNConnected = BNConnected local BNFeaturesEnabled = BNFeaturesEnabled +local GetGuildRosterInfo = GetGuildRosterInfo local GetNumSubgroupMembers = GetNumSubgroupMembers local GetQuestDifficultyColor = GetQuestDifficultyColor local hooksecurefunc = hooksecurefunc +local GUILDMEMBERS_TO_DISPLAY = GUILDMEMBERS_TO_DISPLAY local C_FriendList_GetNumWhoResults = C_FriendList.GetNumWhoResults local C_FriendList_GetWhoInfo = C_FriendList.GetWhoInfo @@ -42,7 +44,7 @@ function S:FriendsFrame() _G.FriendsFrameTab2:Point('TOPLEFT', _G.FriendsFrameTab1, 'TOPRIGHT', -19, 0) _G.FriendsFrameTab3:Point('TOPLEFT', _G.FriendsFrameTab2, 'TOPRIGHT', -19, 0) _G.FriendsFrameTab4:Point('TOPLEFT', _G.FriendsFrameTab3, 'TOPRIGHT', -19, 0) - _G.FriendsFrameTab5:Point('TOPLEFT', _G.FriendsFrameTab4, 'TOPRIGHT', -19, 0) + -- _G.FriendsFrameTab5:Point('TOPLEFT', _G.FriendsFrameTab4, 'TOPRIGHT', -19, 0) -- Friends List Frame for i = 1, _G.FRIEND_HEADER_TAB_IGNORE do @@ -274,6 +276,143 @@ function S:FriendsFrame() end end) + -- Guild Frame (/groster) + _G.GuildFrame:StripTextures() + _G.GuildFrameColumnHeader3:ClearAllPoints() + _G.GuildFrameColumnHeader3:Point('TOPLEFT', 8, -57) + _G.GuildFrameColumnHeader4:ClearAllPoints() + _G.GuildFrameColumnHeader4:Point('LEFT', _G.GuildFrameColumnHeader3, 'RIGHT', -2, -0) + _G.GuildFrameColumnHeader4:Width(50) + _G.GuildFrameColumnHeader1:ClearAllPoints() + _G.GuildFrameColumnHeader1:Point('LEFT', _G.GuildFrameColumnHeader4, 'RIGHT', -2, -0) + _G.GuildFrameColumnHeader1:Width(105) + _G.GuildFrameColumnHeader2:ClearAllPoints() + _G.GuildFrameColumnHeader2:Point('LEFT', _G.GuildFrameColumnHeader1, 'RIGHT', -2, -0) + _G.GuildFrameColumnHeader2:Width(127) + for i = 1, _G.GUILDMEMBERS_TO_DISPLAY do + local button = _G['GuildFrameButton'..i] + local level = _G['GuildFrameButton'..i..'Level'] + local name = _G['GuildFrameButton'..i..'Name'] + local class = _G['GuildFrameButton'..i..'Class'] + local statusButton = _G['GuildFrameGuildStatusButton'..i] + local statusName = _G['GuildFrameGuildStatusButton'..i..'Name'] + button.icon = button:CreateTexture('$parentIcon', 'ARTWORK') + button.icon:Point('LEFT', 48, 0) + button.icon:Size(15) + button.icon:SetTexture([[Interface\WorldStateFrame\Icons-Classes]]) + button.icon:CreateBackdrop(nil, true, nil, nil, nil, nil, nil, button.icon) + S:HandleButtonHighlight(button) + S:HandleButtonHighlight(statusButton) + level:ClearAllPoints() + level:SetPoint('TOPLEFT', 10, -1) + name:SetSize(100, 14) + name:ClearAllPoints() + name:SetPoint('LEFT', 85, 0) + class:Hide() + statusName:ClearAllPoints() + statusName:SetPoint('LEFT', 10, 0) + end + hooksecurefunc('GuildStatus_Update', function() + if FriendsFrame.playerStatusFrame then + local playerZone = E.MapInfo.realZoneText + for i = 1, GUILDMEMBERS_TO_DISPLAY do + local button = _G['GuildFrameButton'..i] + local _, _, _, level, class, zone, _, _, online = GetGuildRosterInfo(button.guildIndex) + local classFileName = E:UnlocalizedClassName(class) + if classFileName then + if online then + local classTextColor = E:ClassColor(classFileName) + local levelTextColor = GetQuestDifficultyColor(level) + _G['GuildFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + _G['GuildFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) + if zone == playerZone then + _G['GuildFrameButton'..i..'Zone']:SetTextColor(0, 1, 0) + else + _G['GuildFrameButton'..i..'Zone']:SetTextColor(1, 1, 1) + end + end + button.icon:SetTexCoord(E:GetClassCoords(classFileName)) + end + end + else + for i = 1, _G.GUILDMEMBERS_TO_DISPLAY do + local button = _G['GuildFrameGuildStatusButton'..i] + local _, _, _, _, class, _, _, _, online = GetGuildRosterInfo(button.guildIndex) + local classFileName = online and E:UnlocalizedClassName(class) + if classFileName then + local classTextColor = E:ClassColor(classFileName) + _G['GuildFrameGuildStatusButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + _G['GuildFrameGuildStatusButton'..i..'Online']:SetTextColor(1, 1, 1) + end + end + end + end) + S:HandleFrame(_G.GuildFrameLFGFrame, true) + S:HandleCheckBox(_G.GuildFrameLFGButton) + for i = 1, 4 do + _G['GuildFrameColumnHeader'..i]:StripTextures() + _G['GuildFrameColumnHeader'..i]:StyleButton() + _G['GuildFrameGuildStatusColumnHeader'..i]:StripTextures() + _G['GuildFrameGuildStatusColumnHeader'..i]:StyleButton() + end + _G.GuildListScrollFrame:StripTextures() + S:HandleScrollBar(_G.GuildListScrollFrameScrollBar) + S:HandleNextPrevButton(_G.GuildFrameGuildListToggleButton, 'left') + S:HandleButton(_G.GuildFrameGuildInformationButton) + _G.GuildFrameGuildInformationButton:Point('BOTTOMLEFT', -1, 4) + S:HandleButton(_G.GuildFrameAddMemberButton) + S:HandleButton(_G.GuildFrameControlButton) + if _G.GuildFrameImpeachButton then + S:HandleButton(_G.GuildFrameImpeachButton) + end + -- Member Detail Frame + _G.GuildMemberDetailFrame:StripTextures() + _G.GuildMemberDetailFrame:CreateBackdrop('Transparent') + _G.GuildMemberDetailFrame:Point('TOPLEFT', _G.GuildFrame, 'TOPRIGHT', 3, -1) + S:HandleCloseButton(_G.GuildMemberDetailCloseButton, _G.GuildMemberDetailFrame.backdrop) + S:HandleButton(_G.GuildMemberRemoveButton) + _G.GuildMemberRemoveButton:Point('BOTTOMLEFT', 3, 3) + S:HandleButton(_G.GuildMemberGroupInviteButton) + _G.GuildMemberGroupInviteButton:Point('BOTTOMRIGHT', -3, 3) + -- Not the reason of the taint + S:HandleNextPrevButton(_G.GuildFramePromoteButton, 'up') + _G.GuildFramePromoteButton:SetHitRectInsets(0, 0, 0, 0) + _G.GuildFramePromoteButton:SetPoint('TOPLEFT', _G.GuildMemberDetailFrame, 'TOPLEFT', 155, -68) + S:HandleNextPrevButton(_G.GuildFrameDemoteButton) + _G.GuildFrameDemoteButton:SetHitRectInsets(0, 0, 0, 0) + _G.GuildFrameDemoteButton:Point('LEFT', _G.GuildFramePromoteButton, 'RIGHT', 2, 0) + _G.GuildMemberNoteBackground:StripTextures() + _G.GuildMemberNoteBackground:CreateBackdrop() + _G.GuildMemberNoteBackground.backdrop:Point('TOPLEFT', 0, -2) + _G.GuildMemberNoteBackground.backdrop:Point('BOTTOMRIGHT', 0, 2) + _G.PersonalNoteText:Point('TOPLEFT', 4, -4) + _G.GuildMemberOfficerNoteBackground:StripTextures() + _G.GuildMemberOfficerNoteBackground:CreateBackdrop() + _G.GuildMemberOfficerNoteBackground.backdrop:Point('TOPLEFT', 0, -2) + _G.GuildMemberOfficerNoteBackground.backdrop:Point('BOTTOMRIGHT', 0, -1) + _G.GuildFrameNotesLabel:Point('TOPLEFT', _G.GuildFrame, 'TOPLEFT', 6, -328) + _G.GuildFrameNotesText:Point('TOPLEFT', _G.GuildFrameNotesLabel, 'BOTTOMLEFT', 0, -6) + _G.GuildFrameBarLeft:StripTextures() + _G.GuildMOTDEditButton:CreateBackdrop() + _G.GuildMOTDEditButton.backdrop:Point('TOPLEFT', -7, 3) + _G.GuildMOTDEditButton.backdrop:Point('BOTTOMRIGHT', 7, -2) + _G.GuildMOTDEditButton:SetHitRectInsets(-7, -7, -3, -2) + -- Info Frame + _G.GuildInfoFrame:StripTextures() + _G.GuildInfoFrame:CreateBackdrop('Transparent') + _G.GuildInfoFrame:Point('TOPLEFT', _G.GuildFrame, 'TOPRIGHT', -1, 6) + _G.GuildInfoFrame.backdrop:Point('TOPLEFT', 3, -6) + _G.GuildInfoFrame.backdrop:Point('BOTTOMRIGHT', -2, 3) + _G.GuildInfoTextBackground.NineSlice:SetTemplate('Transparent') + S:HandleScrollBar(_G.GuildInfoFrameScrollFrameScrollBar) + S:HandleCloseButton(_G.GuildInfoCloseButton, _G.GuildInfoFrame.backdrop) + S:HandleButton(_G.GuildInfoSaveButton) + S:HandleButton(_G.GuildInfoCancelButton) + _G.GuildInfoCancelButton:ClearAllPoints() + _G.GuildInfoCancelButton:Point('BOTTOMRIGHT', _G.GuildInfoFrame, -10, 8) + _G.GuildInfoSaveButton:ClearAllPoints() + _G.GuildInfoSaveButton:Point('RIGHT', _G.GuildInfoCancelButton, 'LEFT', -4, 0) + -- Raid Frame S:HandleButton(_G.RaidFrameConvertToRaidButton) _G.RaidFrameConvertToRaidButton:Point('BOTTOMRIGHT', -6, 4) From 52192bbdd390e2502c884aff9e547e0a3eeda5ed Mon Sep 17 00:00:00 2001 From: Luckyone Date: Thu, 14 Nov 2024 11:33:26 +0100 Subject: [PATCH 03/14] Control popup --- ElvUI/Classic/Modules/Skins/Friends.lua | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/ElvUI/Classic/Modules/Skins/Friends.lua b/ElvUI/Classic/Modules/Skins/Friends.lua index 49c40c2b48..747af727e1 100644 --- a/ElvUI/Classic/Modules/Skins/Friends.lua +++ b/ElvUI/Classic/Modules/Skins/Friends.lua @@ -289,6 +289,7 @@ function S:FriendsFrame() _G.GuildFrameColumnHeader2:ClearAllPoints() _G.GuildFrameColumnHeader2:Point('LEFT', _G.GuildFrameColumnHeader1, 'RIGHT', -2, -0) _G.GuildFrameColumnHeader2:Width(127) + for i = 1, _G.GUILDMEMBERS_TO_DISPLAY do local button = _G['GuildFrameButton'..i] local level = _G['GuildFrameButton'..i..'Level'] @@ -312,6 +313,7 @@ function S:FriendsFrame() statusName:ClearAllPoints() statusName:SetPoint('LEFT', 10, 0) end + hooksecurefunc('GuildStatus_Update', function() if FriendsFrame.playerStatusFrame then local playerZone = E.MapInfo.realZoneText @@ -347,21 +349,26 @@ function S:FriendsFrame() end end end) + S:HandleFrame(_G.GuildFrameLFGFrame, true) S:HandleCheckBox(_G.GuildFrameLFGButton) + for i = 1, 4 do _G['GuildFrameColumnHeader'..i]:StripTextures() _G['GuildFrameColumnHeader'..i]:StyleButton() _G['GuildFrameGuildStatusColumnHeader'..i]:StripTextures() _G['GuildFrameGuildStatusColumnHeader'..i]:StyleButton() end + _G.GuildListScrollFrame:StripTextures() S:HandleScrollBar(_G.GuildListScrollFrameScrollBar) + S:HandleNextPrevButton(_G.GuildFrameGuildListToggleButton, 'left') S:HandleButton(_G.GuildFrameGuildInformationButton) _G.GuildFrameGuildInformationButton:Point('BOTTOMLEFT', -1, 4) S:HandleButton(_G.GuildFrameAddMemberButton) S:HandleButton(_G.GuildFrameControlButton) + if _G.GuildFrameImpeachButton then S:HandleButton(_G.GuildFrameImpeachButton) end @@ -374,6 +381,7 @@ function S:FriendsFrame() _G.GuildMemberRemoveButton:Point('BOTTOMLEFT', 3, 3) S:HandleButton(_G.GuildMemberGroupInviteButton) _G.GuildMemberGroupInviteButton:Point('BOTTOMRIGHT', -3, 3) + -- Not the reason of the taint S:HandleNextPrevButton(_G.GuildFramePromoteButton, 'up') _G.GuildFramePromoteButton:SetHitRectInsets(0, 0, 0, 0) @@ -397,6 +405,7 @@ function S:FriendsFrame() _G.GuildMOTDEditButton.backdrop:Point('TOPLEFT', -7, 3) _G.GuildMOTDEditButton.backdrop:Point('BOTTOMRIGHT', 7, -2) _G.GuildMOTDEditButton:SetHitRectInsets(-7, -7, -3, -2) + -- Info Frame _G.GuildInfoFrame:StripTextures() _G.GuildInfoFrame:CreateBackdrop('Transparent') @@ -413,6 +422,28 @@ function S:FriendsFrame() _G.GuildInfoSaveButton:ClearAllPoints() _G.GuildInfoSaveButton:Point('RIGHT', _G.GuildInfoCancelButton, 'LEFT', -4, 0) + -- Guild Control Frame (Guild Master Only) + _G.GuildControlPopupFrame:StripTextures() + _G.GuildControlPopupFrame:CreateBackdrop('Transparent') + _G.GuildControlPopupFrame.backdrop:Point('TOPLEFT', 3, 0) + S:HandleDropDownBox(_G.GuildControlPopupFrameDropdown, 170) + -- _G.GuildControlPopupFrameDropdownButton:Size(18) + S:HandleCollapseTexture(_G.GuildControlPopupFrameAddRankButton, nil, true) + _G.GuildControlPopupFrameAddRankButton:Point('LEFT', _G.GuildControlPopupFrameDropdown, 'RIGHT', -2, 3) + S:HandleCollapseTexture(_G.GuildControlPopupFrameRemoveRankButton, nil, true) + _G.GuildControlPopupFrameRemoveRankButton:Point('LEFT', _G.GuildControlPopupFrameAddRankButton, 'RIGHT', 2, 0) + _G.GuildControlPopupFrameEditBox:StripTextures() + S:HandleEditBox(_G.GuildControlPopupFrameEditBox) + _G.GuildControlPopupFrameEditBox.backdrop:Point('TOPLEFT', 0, -5) + _G.GuildControlPopupFrameEditBox.backdrop:Point('BOTTOMRIGHT', 0, 5) + for _, CheckBox in pairs({ _G.GuildControlPopupFrameCheckboxes:GetChildren()}) do + if CheckBox:IsObjectType('CheckButton') then + S:HandleCheckBox(CheckBox) + end + end + S:HandleButton(_G.GuildControlPopupAcceptButton) + S:HandleButton(_G.GuildControlPopupFrameCancelButton) + -- Raid Frame S:HandleButton(_G.RaidFrameConvertToRaidButton) _G.RaidFrameConvertToRaidButton:Point('BOTTOMRIGHT', -6, 4) From fff960faa1870f0df82b5d92e028e509d5d0665b Mon Sep 17 00:00:00 2001 From: Simpy Date: Thu, 14 Nov 2024 13:59:08 -0500 Subject: [PATCH 04/14] clean up friends skin --- ElvUI/Cata/Modules/Skins/Friends.lua | 82 +++++--------- ElvUI/Classic/Modules/Skins/Friends.lua | 143 +++++++++++------------- 2 files changed, 97 insertions(+), 128 deletions(-) diff --git a/ElvUI/Cata/Modules/Skins/Friends.lua b/ElvUI/Cata/Modules/Skins/Friends.lua index 23f7058c2b..76ad65ffd7 100644 --- a/ElvUI/Cata/Modules/Skins/Friends.lua +++ b/ElvUI/Cata/Modules/Skins/Friends.lua @@ -6,7 +6,6 @@ local unpack, pairs = unpack, pairs local BNConnected = BNConnected local BNFeaturesEnabled = BNFeaturesEnabled -local GetNumSubgroupMembers = GetNumSubgroupMembers local GetQuestDifficultyColor = GetQuestDifficultyColor local hooksecurefunc = hooksecurefunc @@ -26,9 +25,7 @@ function S:FriendsFrame() -- Friends Frame local FriendsFrame = _G.FriendsFrame S:HandleFrame(FriendsFrame, true, nil, -5, 0, -2) - _G.FriendsFrameCloseButton:Point('TOPRIGHT', 0, 2) - S:HandleDropDownBox(_G.FriendsFrameStatusDropdown, 70) _G.FriendsFrameStatusDropdown:PointXY(256, -55) @@ -55,12 +52,13 @@ function S:FriendsFrame() for i = 1, _G.FRIENDS_FRIENDS_TO_DISPLAY do local button = 'FriendsFrameFriendsScrollFrameButton'..i + local btn = _G[button] _G[button..'SummonButtonIcon']:SetTexCoord(unpack(E.TexCoords)) _G[button..'SummonButtonNormalTexture']:SetAlpha(0) _G[button..'SummonButton']:StyleButton() - _G[button].highlight:SetTexture(E.Media.Textures.Highlight) - _G[button].highlight:SetAlpha(0.3) + btn.highlight:SetTexture(E.Media.Textures.Highlight) + btn.highlight:SetAlpha(0.3) end for i = 1, _G.FRIENDS_FRIENDS_TO_DISPLAY do @@ -68,22 +66,18 @@ function S:FriendsFrame() end S:HandleScrollBar(_G.FriendsFrameFriendsScrollFrameScrollBar) - S:HandleButton(_G.AddFriendEntryFrameAcceptButton) S:HandleButton(_G.AddFriendEntryFrameCancelButton) S:HandleButton(_G.FriendsFrameAddFriendButton) S:HandleButton(_G.FriendsFrameSendMessageButton) S:HandleButton(_G.FriendsFrameUnsquelchButton) - _G.FriendsFrameAddFriendButton:PointXY(-1, 4) -- Battle.net local FriendsFrameBattlenetFrame = _G.FriendsFrameBattlenetFrame FriendsFrameBattlenetFrame:StripTextures() FriendsFrameBattlenetFrame:GetRegions():Hide() - FriendsFrameBattlenetFrame.UnavailableInfoFrame:Point('TOPLEFT', FriendsFrame, 'TOPRIGHT', 1, -18) - FriendsFrameBattlenetFrame.Tag:SetParent(_G.FriendsListFrame) FriendsFrameBattlenetFrame.Tag:Point('TOP', FriendsFrame, 'TOP', 0, -8) @@ -99,7 +93,6 @@ function S:FriendsFrame() hooksecurefunc('FriendsFrame_CheckBattlenetStatus', function() if BNFeaturesEnabled() then - FriendsFrameBattlenetFrame.BroadcastButton:Hide() if BNConnected() then @@ -121,17 +114,14 @@ function S:FriendsFrame() end) S:HandleEditBox(_G.AddFriendNameEditBox) - _G.AddFriendFrame:SetTemplate('Transparent') -- Pending invites _G.FriendsFrameFriendsScrollFrame:StripTextures() - S:HandleButton(_G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton, true) _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton:SetScript('OnMouseUp', nil) _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton:SetScript('OnMouseDown', nil) - _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.RightArrow:SetTexture(E.Media.Textures.ArrowUp) _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.RightArrow:SetRotation(S.ArrowRotation['right']) _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.DownArrow:SetTexture(E.Media.Textures.ArrowUp) @@ -154,19 +144,14 @@ function S:FriendsFrame() S:HandleButton(_G.FriendsFriendsCloseButton) S:HandleButton(_G.FriendsFriendsSendRequestButton) - S:HandleEditBox(_G.FriendsFriendsList) - S:HandleScrollBar(_G.FriendsFriendsScrollFrameScrollBar) - S:HandleDropDownBox(_G.FriendsFriendsFrameDropdown, 150) -- Ignore List Frame _G.IgnoreListFrame:StripTextures() - S:HandleButton(_G.FriendsFrameIgnorePlayerButton, true) S:HandleButton(_G.FriendsFrameUnsquelchButton, true) - S:HandleScrollBar(_G.FriendsFrameIgnoreScrollFrameScrollBar) -- Who Frame @@ -216,7 +201,7 @@ function S:FriendsFrame() local button = _G['WhoFrameButton'..i] local level = _G['WhoFrameButton'..i..'Level'] local name = _G['WhoFrameButton'..i..'Name'] - local class = _G['WhoFrameButton'..i..'Class'] + local className = _G['WhoFrameButton'..i..'Class'] button.icon = button:CreateTexture('$parentIcon', 'ARTWORK') button.icon:Point('LEFT', 45, 0) @@ -233,7 +218,7 @@ function S:FriendsFrame() name:ClearAllPoints() name:SetPoint('LEFT', 85, 0) - class:Hide() + className:Hide() end hooksecurefunc('WhoList_Update', function() @@ -245,31 +230,32 @@ function S:FriendsFrame() end local playerZone = E.MapInfo.realZoneText - local classTextColor, levelTextColor - for i = 1, numWhos do local button = _G['WhoFrameButton'..i] - local info = C_FriendList_GetWhoInfo(button.whoIndex) - - if info.filename then - classTextColor = E:ClassColor(info.filename) - button.icon:Show() - button.icon:SetTexCoord(E:GetClassCoords(info.filename)) - else - classTextColor = _G.HIGHLIGHT_FONT_COLOR - button.icon:Hide() - end - - levelTextColor = GetQuestDifficultyColor(info.level) - - _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) - _G['WhoFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) - _G['WhoFrameButton'..i..'Class']:SetTextColor(1, 1, 1) - - if info.area == playerZone then - _G['WhoFrameButton'..i..'Variable']:SetTextColor(0, 1, 0) - else - _G['WhoFrameButton'..i..'Variable']:SetTextColor(1, 1, 1) + if button and button.whoIndex then + local info = C_FriendList_GetWhoInfo(button.whoIndex) + if info.filename then + local classTextColor = E:ClassColor(info.filename) + _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + + button.icon:Show() + button.icon:SetTexCoord(E:GetClassCoords(info.filename)) + else + local classTextColor = _G.HIGHLIGHT_FONT_COLOR + _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + + button.icon:Hide() + end + + local levelTextColor = GetQuestDifficultyColor(info.level) + _G['WhoFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) + _G['WhoFrameButton'..i..'Class']:SetTextColor(1, 1, 1) + + if info.area == playerZone then + _G['WhoFrameButton'..i..'Variable']:SetTextColor(0, 1, 0) + else + _G['WhoFrameButton'..i..'Variable']:SetTextColor(1, 1, 1) + end end end end) @@ -282,19 +268,13 @@ function S:FriendsFrame() -- Raid Info Frame _G.RaidInfoFrame:StripTextures(true) _G.RaidInfoFrame:CreateBackdrop('Transparent') - _G.RaidInfoFrame:HookScript('OnShow', function() - if GetNumSubgroupMembers() > 0 then - _G.RaidInfoFrame:Point('TOPLEFT', _G.RaidFrame, 'TOPRIGHT', 0, 0) - else - _G.RaidInfoFrame:Point('TOPLEFT', _G.RaidFrame, 'TOPRIGHT', 0, 0) - end + _G.RaidInfoFrame:Point('TOPLEFT', _G.RaidFrame, 'TOPRIGHT', 0, 0) end) - S:HandleCloseButton(_G.RaidInfoCloseButton, _G.RaidInfoFrame) - _G.RaidInfoScrollFrame:StripTextures() S:HandleScrollBar(_G.RaidInfoScrollFrameScrollBar) + S:HandleCloseButton(_G.RaidInfoCloseButton, _G.RaidInfoFrame) _G.RaidInfoInstanceLabel:SetTemplate() _G.RaidInfoIDLabel:SetTemplate() diff --git a/ElvUI/Classic/Modules/Skins/Friends.lua b/ElvUI/Classic/Modules/Skins/Friends.lua index 747af727e1..dce0452da1 100644 --- a/ElvUI/Classic/Modules/Skins/Friends.lua +++ b/ElvUI/Classic/Modules/Skins/Friends.lua @@ -7,7 +7,6 @@ local unpack, pairs = unpack, pairs local BNConnected = BNConnected local BNFeaturesEnabled = BNFeaturesEnabled local GetGuildRosterInfo = GetGuildRosterInfo -local GetNumSubgroupMembers = GetNumSubgroupMembers local GetQuestDifficultyColor = GetQuestDifficultyColor local hooksecurefunc = hooksecurefunc @@ -28,9 +27,7 @@ function S:FriendsFrame() -- Friends Frame local FriendsFrame = _G.FriendsFrame S:HandleFrame(FriendsFrame, true, nil, -5, 0, -2) - _G.FriendsFrameCloseButton:Point('TOPRIGHT', 0, 2) - S:HandleDropDownBox(_G.FriendsFrameStatusDropdown, 70) _G.FriendsFrameStatusDropdown:PointXY(256, -55) @@ -57,12 +54,13 @@ function S:FriendsFrame() for i = 1, _G.FRIENDS_FRIENDS_TO_DISPLAY do local button = 'FriendsFrameFriendsScrollFrameButton'..i + local btn = _G[button] _G[button..'SummonButtonIcon']:SetTexCoord(unpack(E.TexCoords)) _G[button..'SummonButtonNormalTexture']:SetAlpha(0) _G[button..'SummonButton']:StyleButton() - _G[button].highlight:SetTexture(E.Media.Textures.Highlight) - _G[button].highlight:SetAlpha(0.3) + btn.highlight:SetTexture(E.Media.Textures.Highlight) + btn.highlight:SetAlpha(0.3) end for i = 1, _G.FRIENDS_FRIENDS_TO_DISPLAY do @@ -70,22 +68,18 @@ function S:FriendsFrame() end S:HandleScrollBar(_G.FriendsFrameFriendsScrollFrameScrollBar) - S:HandleButton(_G.AddFriendEntryFrameAcceptButton) S:HandleButton(_G.AddFriendEntryFrameCancelButton) S:HandleButton(_G.FriendsFrameAddFriendButton) S:HandleButton(_G.FriendsFrameSendMessageButton) S:HandleButton(_G.FriendsFrameUnsquelchButton) - _G.FriendsFrameAddFriendButton:PointXY(-1, 4) -- Battle.net local FriendsFrameBattlenetFrame = _G.FriendsFrameBattlenetFrame FriendsFrameBattlenetFrame:StripTextures() FriendsFrameBattlenetFrame:GetRegions():Hide() - FriendsFrameBattlenetFrame.UnavailableInfoFrame:Point('TOPLEFT', FriendsFrame, 'TOPRIGHT', 1, -18) - FriendsFrameBattlenetFrame.Tag:SetParent(_G.FriendsListFrame) FriendsFrameBattlenetFrame.Tag:Point('TOP', FriendsFrame, 'TOP', 0, -8) @@ -101,7 +95,6 @@ function S:FriendsFrame() hooksecurefunc('FriendsFrame_CheckBattlenetStatus', function() if BNFeaturesEnabled() then - FriendsFrameBattlenetFrame.BroadcastButton:Hide() if BNConnected() then @@ -123,17 +116,14 @@ function S:FriendsFrame() end) S:HandleEditBox(_G.AddFriendNameEditBox) - _G.AddFriendFrame:SetTemplate('Transparent') -- Pending invites _G.FriendsFrameFriendsScrollFrame:StripTextures() - S:HandleButton(_G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton, true) _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton:SetScript('OnMouseUp', nil) _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton:SetScript('OnMouseDown', nil) - _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.RightArrow:SetTexture(E.Media.Textures.ArrowUp) _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.RightArrow:SetRotation(S.ArrowRotation['right']) _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.DownArrow:SetTexture(E.Media.Textures.ArrowUp) @@ -156,19 +146,14 @@ function S:FriendsFrame() S:HandleButton(_G.FriendsFriendsCloseButton) S:HandleButton(_G.FriendsFriendsSendRequestButton) - S:HandleEditBox(_G.FriendsFriendsList) - S:HandleScrollBar(_G.FriendsFriendsScrollFrameScrollBar) - S:HandleDropDownBox(_G.FriendsFriendsFrameDropdown, 150) -- Ignore List Frame _G.IgnoreListFrame:StripTextures() - S:HandleButton(_G.FriendsFrameIgnorePlayerButton, true) S:HandleButton(_G.FriendsFrameUnsquelchButton, true) - S:HandleScrollBar(_G.FriendsFrameIgnoreScrollFrameScrollBar) -- Who Frame @@ -218,7 +203,7 @@ function S:FriendsFrame() local button = _G['WhoFrameButton'..i] local level = _G['WhoFrameButton'..i..'Level'] local name = _G['WhoFrameButton'..i..'Name'] - local class = _G['WhoFrameButton'..i..'Class'] + local className = _G['WhoFrameButton'..i..'Class'] button.icon = button:CreateTexture('$parentIcon', 'ARTWORK') button.icon:Point('LEFT', 45, 0) @@ -235,7 +220,7 @@ function S:FriendsFrame() name:ClearAllPoints() name:SetPoint('LEFT', 85, 0) - class:Hide() + className:Hide() end hooksecurefunc('WhoList_Update', function() @@ -247,31 +232,32 @@ function S:FriendsFrame() end local playerZone = E.MapInfo.realZoneText - local classTextColor, levelTextColor - for i = 1, numWhos do local button = _G['WhoFrameButton'..i] - local info = C_FriendList_GetWhoInfo(button.whoIndex) - - if info.filename then - classTextColor = E:ClassColor(info.filename) - button.icon:Show() - button.icon:SetTexCoord(E:GetClassCoords(info.filename)) - else - classTextColor = _G.HIGHLIGHT_FONT_COLOR - button.icon:Hide() - end - - levelTextColor = GetQuestDifficultyColor(info.level) + if button and button.whoIndex then + local info = C_FriendList_GetWhoInfo(button.whoIndex) + if info.filename then + local classTextColor = E:ClassColor(info.filename) + _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + + button.icon:Show() + button.icon:SetTexCoord(E:GetClassCoords(info.filename)) + else + local classTextColor = _G.HIGHLIGHT_FONT_COLOR + _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + + button.icon:Hide() + end - _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) - _G['WhoFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) - _G['WhoFrameButton'..i..'Class']:SetTextColor(1, 1, 1) + local levelTextColor = GetQuestDifficultyColor(info.level) + _G['WhoFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) + _G['WhoFrameButton'..i..'Class']:SetTextColor(1, 1, 1) - if info.area == playerZone then - _G['WhoFrameButton'..i..'Variable']:SetTextColor(0, 1, 0) - else - _G['WhoFrameButton'..i..'Variable']:SetTextColor(1, 1, 1) + if info.area == playerZone then + _G['WhoFrameButton'..i..'Variable']:SetTextColor(0, 1, 0) + else + _G['WhoFrameButton'..i..'Variable']:SetTextColor(1, 1, 1) + end end end end) @@ -290,18 +276,20 @@ function S:FriendsFrame() _G.GuildFrameColumnHeader2:Point('LEFT', _G.GuildFrameColumnHeader1, 'RIGHT', -2, -0) _G.GuildFrameColumnHeader2:Width(127) - for i = 1, _G.GUILDMEMBERS_TO_DISPLAY do + for i = 1, GUILDMEMBERS_TO_DISPLAY do local button = _G['GuildFrameButton'..i] local level = _G['GuildFrameButton'..i..'Level'] local name = _G['GuildFrameButton'..i..'Name'] - local class = _G['GuildFrameButton'..i..'Class'] + local classButton = _G['GuildFrameButton'..i..'Class'] local statusButton = _G['GuildFrameGuildStatusButton'..i] local statusName = _G['GuildFrameGuildStatusButton'..i..'Name'] + button.icon = button:CreateTexture('$parentIcon', 'ARTWORK') button.icon:Point('LEFT', 48, 0) button.icon:Size(15) button.icon:SetTexture([[Interface\WorldStateFrame\Icons-Classes]]) button.icon:CreateBackdrop(nil, true, nil, nil, nil, nil, nil, button.icon) + S:HandleButtonHighlight(button) S:HandleButtonHighlight(statusButton) level:ClearAllPoints() @@ -309,7 +297,7 @@ function S:FriendsFrame() name:SetSize(100, 14) name:ClearAllPoints() name:SetPoint('LEFT', 85, 0) - class:Hide() + classButton:Hide() statusName:ClearAllPoints() statusName:SetPoint('LEFT', 10, 0) end @@ -319,32 +307,38 @@ function S:FriendsFrame() local playerZone = E.MapInfo.realZoneText for i = 1, GUILDMEMBERS_TO_DISPLAY do local button = _G['GuildFrameButton'..i] - local _, _, _, level, class, zone, _, _, online = GetGuildRosterInfo(button.guildIndex) - local classFileName = E:UnlocalizedClassName(class) - if classFileName then - if online then - local classTextColor = E:ClassColor(classFileName) - local levelTextColor = GetQuestDifficultyColor(level) - _G['GuildFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) - _G['GuildFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) - if zone == playerZone then - _G['GuildFrameButton'..i..'Zone']:SetTextColor(0, 1, 0) - else - _G['GuildFrameButton'..i..'Zone']:SetTextColor(1, 1, 1) + if button and button.guildIndex then + local _, _, _, level, className, zone, _, _, online = GetGuildRosterInfo(button.guildIndex) + local classFileName = E:UnlocalizedClassName(className) + if classFileName then + if online then + local classTextColor = E:ClassColor(classFileName) + local levelTextColor = GetQuestDifficultyColor(level) + _G['GuildFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + _G['GuildFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) + + if zone == playerZone then + _G['GuildFrameButton'..i..'Zone']:SetTextColor(0, 1, 0) + else + _G['GuildFrameButton'..i..'Zone']:SetTextColor(1, 1, 1) + end end + + button.icon:SetTexCoord(E:GetClassCoords(classFileName)) end - button.icon:SetTexCoord(E:GetClassCoords(classFileName)) end end else - for i = 1, _G.GUILDMEMBERS_TO_DISPLAY do + for i = 1, GUILDMEMBERS_TO_DISPLAY do local button = _G['GuildFrameGuildStatusButton'..i] - local _, _, _, _, class, _, _, _, online = GetGuildRosterInfo(button.guildIndex) - local classFileName = online and E:UnlocalizedClassName(class) - if classFileName then - local classTextColor = E:ClassColor(classFileName) - _G['GuildFrameGuildStatusButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) - _G['GuildFrameGuildStatusButton'..i..'Online']:SetTextColor(1, 1, 1) + if button and button.guildIndex then + local _, _, _, _, className, _, _, _, online = GetGuildRosterInfo(button.guildIndex) + local classFileName = online and E:UnlocalizedClassName(className) + if classFileName then + local classTextColor = E:ClassColor(classFileName) + _G['GuildFrameGuildStatusButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + _G['GuildFrameGuildStatusButton'..i..'Online']:SetTextColor(1, 1, 1) + end end end end @@ -362,7 +356,6 @@ function S:FriendsFrame() _G.GuildListScrollFrame:StripTextures() S:HandleScrollBar(_G.GuildListScrollFrameScrollBar) - S:HandleNextPrevButton(_G.GuildFrameGuildListToggleButton, 'left') S:HandleButton(_G.GuildFrameGuildInformationButton) _G.GuildFrameGuildInformationButton:Point('BOTTOMLEFT', -1, 4) @@ -372,6 +365,7 @@ function S:FriendsFrame() if _G.GuildFrameImpeachButton then S:HandleButton(_G.GuildFrameImpeachButton) end + -- Member Detail Frame _G.GuildMemberDetailFrame:StripTextures() _G.GuildMemberDetailFrame:CreateBackdrop('Transparent') @@ -436,11 +430,13 @@ function S:FriendsFrame() S:HandleEditBox(_G.GuildControlPopupFrameEditBox) _G.GuildControlPopupFrameEditBox.backdrop:Point('TOPLEFT', 0, -5) _G.GuildControlPopupFrameEditBox.backdrop:Point('BOTTOMRIGHT', 0, 5) - for _, CheckBox in pairs({ _G.GuildControlPopupFrameCheckboxes:GetChildren()}) do - if CheckBox:IsObjectType('CheckButton') then - S:HandleCheckBox(CheckBox) + + for _, checkBox in pairs({ _G.GuildControlPopupFrameCheckboxes:GetChildren()}) do + if checkBox:IsObjectType('CheckButton') then + S:HandleCheckBox(checkBox) end end + S:HandleButton(_G.GuildControlPopupAcceptButton) S:HandleButton(_G.GuildControlPopupFrameCancelButton) @@ -448,25 +444,18 @@ function S:FriendsFrame() S:HandleButton(_G.RaidFrameConvertToRaidButton) _G.RaidFrameConvertToRaidButton:Point('BOTTOMRIGHT', -6, 4) S:HandleButton(_G.RaidFrameRaidInfoButton) - S:HandleCheckBox(_G.RaidFrameAllAssistCheckButton) -- Raid Info Frame _G.RaidInfoFrame:StripTextures(true) _G.RaidInfoFrame:CreateBackdrop('Transparent') - _G.RaidInfoFrame:HookScript('OnShow', function() - if GetNumSubgroupMembers() > 0 then - _G.RaidInfoFrame:Point('TOPLEFT', _G.RaidFrame, 'TOPRIGHT', 0, 0) - else - _G.RaidInfoFrame:Point('TOPLEFT', _G.RaidFrame, 'TOPRIGHT', 0, 0) - end + _G.RaidInfoFrame:Point('TOPLEFT', _G.RaidFrame, 'TOPRIGHT', 0, 0) end) - S:HandleCloseButton(_G.RaidInfoCloseButton, _G.RaidInfoFrame) - _G.RaidInfoScrollFrame:StripTextures() S:HandleScrollBar(_G.RaidInfoScrollFrameScrollBar) + S:HandleCloseButton(_G.RaidInfoCloseButton, _G.RaidInfoFrame) end S:AddCallback('FriendsFrame') From e34cf7f00a52ae1c7cb5a10401670cd5e9471292 Mon Sep 17 00:00:00 2001 From: Simpy Date: Thu, 14 Nov 2024 14:23:33 -0500 Subject: [PATCH 05/14] clean up friends skin - part 2 --- ElvUI/Cata/Modules/Skins/Friends.lua | 147 ++++++++------- ElvUI/Classic/Modules/Skins/Friends.lua | 231 +++++++++++++----------- 2 files changed, 201 insertions(+), 177 deletions(-) diff --git a/ElvUI/Cata/Modules/Skins/Friends.lua b/ElvUI/Cata/Modules/Skins/Friends.lua index 76ad65ffd7..ff95cfa37b 100644 --- a/ElvUI/Cata/Modules/Skins/Friends.lua +++ b/ElvUI/Cata/Modules/Skins/Friends.lua @@ -12,13 +12,86 @@ local hooksecurefunc = hooksecurefunc local C_FriendList_GetNumWhoResults = C_FriendList.GetNumWhoResults local C_FriendList_GetWhoInfo = C_FriendList.GetWhoInfo -local function skinFriendRequest(frame) +local function SkinFriendRequest(frame) if frame.IsSkinned then return end + S:HandleButton(frame.DeclineButton, nil, true) S:HandleButton(frame.AcceptButton) + frame.IsSkinned = true end +local function CheckBattlenetStatus() + if BNFeaturesEnabled() then + _G.FriendsFrameBattlenetFrame.BroadcastButton:Hide() + + if BNConnected() then + _G.FriendsFrameBattlenetFrame:Hide() + _G.FriendsFrameBroadcastInput:Show() + _G.FriendsFrameBroadcastInput_UpdateDisplay() + end + end +end + +local function UpdateFriendsFrame() + if _G.FriendsFrame.selectedTab == 1 and _G.FriendsTabHeader.selectedTab == 1 and _G.FriendsFrameBattlenetFrame.Tag:IsShown() then + _G.FriendsFrameTitleText:Hide() + else + _G.FriendsFrameTitleText:Show() + end +end + +local function AcquireInvitePool(pool) + if pool.activeObjects then + for object in pairs(pool.activeObjects) do + SkinFriendRequest(object) + end + end +end + +local function UpdateWhoList() + local numWhos = C_FriendList_GetNumWhoResults() + if numWhos == 0 then return end + + if numWhos > _G.WHOS_TO_DISPLAY then + numWhos = _G.WHOS_TO_DISPLAY + end + + local playerZone = E.MapInfo.realZoneText + for i = 1, numWhos do + local button = _G['WhoFrameButton'..i] + if button and button.whoIndex then + local info = C_FriendList_GetWhoInfo(button.whoIndex) + if info.filename then + local classTextColor = E:ClassColor(info.filename) + _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + + button.icon:Show() + button.icon:SetTexCoord(E:GetClassCoords(info.filename)) + else + local classTextColor = _G.HIGHLIGHT_FONT_COLOR + _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + + button.icon:Hide() + end + + local levelTextColor = GetQuestDifficultyColor(info.level) + _G['WhoFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) + _G['WhoFrameButton'..i..'Class']:SetTextColor(1, 1, 1) + + if info.area == playerZone then + _G['WhoFrameButton'..i..'Variable']:SetTextColor(0, 1, 0) + else + _G['WhoFrameButton'..i..'Variable']:SetTextColor(1, 1, 1) + end + end + end +end + +local function RaidInfoFrame_OnShow() + _G.RaidInfoFrame:Point('TOPLEFT', _G.RaidFrame, 'TOPRIGHT', 0, 0) +end + function S:FriendsFrame() if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.friends) then return end @@ -91,27 +164,11 @@ function S:FriendsFrame() _G.FriendsFrameBroadcastInputRight:Kill() _G.FriendsFrameBroadcastInputMiddle:Kill() - hooksecurefunc('FriendsFrame_CheckBattlenetStatus', function() - if BNFeaturesEnabled() then - FriendsFrameBattlenetFrame.BroadcastButton:Hide() - - if BNConnected() then - FriendsFrameBattlenetFrame:Hide() - _G.FriendsFrameBroadcastInput:Show() - _G.FriendsFrameBroadcastInput_UpdateDisplay() - end - end - end) + hooksecurefunc('FriendsFrame_CheckBattlenetStatus', CheckBattlenetStatus) _G.FriendsFrame_CheckBattlenetStatus() - hooksecurefunc('FriendsFrame_Update', function() - if FriendsFrame.selectedTab == 1 and _G.FriendsTabHeader.selectedTab == 1 and _G.FriendsFrameBattlenetFrame.Tag:IsShown() then - _G.FriendsFrameTitleText:Hide() - else - _G.FriendsFrameTitleText:Show() - end - end) + hooksecurefunc('FriendsFrame_Update', UpdateFriendsFrame) S:HandleEditBox(_G.AddFriendNameEditBox) _G.AddFriendFrame:SetTemplate('Transparent') @@ -129,16 +186,9 @@ function S:FriendsFrame() _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.RightArrow:SetPoint('LEFT', 11, 0) _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.DownArrow:SetPoint('TOPLEFT', 8, -10) - hooksecurefunc(_G.FriendsFrameFriendsScrollFrame.invitePool, 'Acquire', function(pool) - if pool.activeObjects then - for object in pairs(pool.activeObjects) do - skinFriendRequest(object) - end - end - end) + hooksecurefunc(_G.FriendsFrameFriendsScrollFrame.invitePool, 'Acquire', AcquireInvitePool) S:HandleFrame(_G.FriendsFriendsFrame, true) - _G.FriendsFriendsList:StripTextures() _G.IgnoreListFrame:StripTextures() @@ -221,44 +271,7 @@ function S:FriendsFrame() className:Hide() end - hooksecurefunc('WhoList_Update', function() - local numWhos = C_FriendList_GetNumWhoResults() - if numWhos == 0 then return end - - if numWhos > _G.WHOS_TO_DISPLAY then - numWhos = _G.WHOS_TO_DISPLAY - end - - local playerZone = E.MapInfo.realZoneText - for i = 1, numWhos do - local button = _G['WhoFrameButton'..i] - if button and button.whoIndex then - local info = C_FriendList_GetWhoInfo(button.whoIndex) - if info.filename then - local classTextColor = E:ClassColor(info.filename) - _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) - - button.icon:Show() - button.icon:SetTexCoord(E:GetClassCoords(info.filename)) - else - local classTextColor = _G.HIGHLIGHT_FONT_COLOR - _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) - - button.icon:Hide() - end - - local levelTextColor = GetQuestDifficultyColor(info.level) - _G['WhoFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) - _G['WhoFrameButton'..i..'Class']:SetTextColor(1, 1, 1) - - if info.area == playerZone then - _G['WhoFrameButton'..i..'Variable']:SetTextColor(0, 1, 0) - else - _G['WhoFrameButton'..i..'Variable']:SetTextColor(1, 1, 1) - end - end - end - end) + hooksecurefunc('WhoList_Update', UpdateWhoList) -- Raid Tab S:HandleButton(_G.RaidFrameRaidInfoButton) @@ -268,9 +281,7 @@ function S:FriendsFrame() -- Raid Info Frame _G.RaidInfoFrame:StripTextures(true) _G.RaidInfoFrame:CreateBackdrop('Transparent') - _G.RaidInfoFrame:HookScript('OnShow', function() - _G.RaidInfoFrame:Point('TOPLEFT', _G.RaidFrame, 'TOPRIGHT', 0, 0) - end) + _G.RaidInfoFrame:HookScript('OnShow', RaidInfoFrame_OnShow) _G.RaidInfoScrollFrame:StripTextures() S:HandleScrollBar(_G.RaidInfoScrollFrameScrollBar) diff --git a/ElvUI/Classic/Modules/Skins/Friends.lua b/ElvUI/Classic/Modules/Skins/Friends.lua index dce0452da1..1c94e07b66 100644 --- a/ElvUI/Classic/Modules/Skins/Friends.lua +++ b/ElvUI/Classic/Modules/Skins/Friends.lua @@ -14,13 +14,128 @@ local GUILDMEMBERS_TO_DISPLAY = GUILDMEMBERS_TO_DISPLAY local C_FriendList_GetNumWhoResults = C_FriendList.GetNumWhoResults local C_FriendList_GetWhoInfo = C_FriendList.GetWhoInfo -local function skinFriendRequest(frame) +local function SkinFriendRequest(frame) if frame.IsSkinned then return end + S:HandleButton(frame.DeclineButton, nil, true) S:HandleButton(frame.AcceptButton) + frame.IsSkinned = true end +local function CheckBattlenetStatus() + if BNFeaturesEnabled() then + _G.FriendsFrameBattlenetFrame.BroadcastButton:Hide() + + if BNConnected() then + _G.FriendsFrameBattlenetFrame:Hide() + _G.FriendsFrameBroadcastInput:Show() + _G.FriendsFrameBroadcastInput_UpdateDisplay() + end + end +end + +local function UpdateFriendsFrame() + if _G.FriendsFrame.selectedTab == 1 and _G.FriendsTabHeader.selectedTab == 1 and _G.FriendsFrameBattlenetFrame.Tag:IsShown() then + _G.FriendsFrameTitleText:Hide() + else + _G.FriendsFrameTitleText:Show() + end +end + +local function AcquireInvitePool(pool) + if pool.activeObjects then + for object in pairs(pool.activeObjects) do + SkinFriendRequest(object) + end + end +end + +local function UpdateWhoList() + local numWhos = C_FriendList_GetNumWhoResults() + if numWhos == 0 then return end + + if numWhos > _G.WHOS_TO_DISPLAY then + numWhos = _G.WHOS_TO_DISPLAY + end + + local playerZone = E.MapInfo.realZoneText + for i = 1, numWhos do + local button = _G['WhoFrameButton'..i] + if button and button.whoIndex then + local info = C_FriendList_GetWhoInfo(button.whoIndex) + if info.filename then + local classTextColor = E:ClassColor(info.filename) + _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + + button.icon:Show() + button.icon:SetTexCoord(E:GetClassCoords(info.filename)) + else + local classTextColor = _G.HIGHLIGHT_FONT_COLOR + _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + + button.icon:Hide() + end + + local levelTextColor = GetQuestDifficultyColor(info.level) + _G['WhoFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) + _G['WhoFrameButton'..i..'Class']:SetTextColor(1, 1, 1) + + if info.area == playerZone then + _G['WhoFrameButton'..i..'Variable']:SetTextColor(0, 1, 0) + else + _G['WhoFrameButton'..i..'Variable']:SetTextColor(1, 1, 1) + end + end + end +end + +local function RaidInfoFrame_OnShow() + _G.RaidInfoFrame:Point('TOPLEFT', _G.RaidFrame, 'TOPRIGHT', 0, 0) +end + +local function UpdateGuildStatus() + if _G.FriendsFrame.playerStatusFrame then + local playerZone = E.MapInfo.realZoneText + for i = 1, GUILDMEMBERS_TO_DISPLAY do + local button = _G['GuildFrameButton'..i] + if button and button.guildIndex then + local _, _, _, level, className, zone, _, _, online = GetGuildRosterInfo(button.guildIndex) + local classFileName = E:UnlocalizedClassName(className) + if classFileName then + if online then + local classTextColor = E:ClassColor(classFileName) + local levelTextColor = GetQuestDifficultyColor(level) + _G['GuildFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + _G['GuildFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) + + if zone == playerZone then + _G['GuildFrameButton'..i..'Zone']:SetTextColor(0, 1, 0) + else + _G['GuildFrameButton'..i..'Zone']:SetTextColor(1, 1, 1) + end + end + + button.icon:SetTexCoord(E:GetClassCoords(classFileName)) + end + end + end + else + for i = 1, GUILDMEMBERS_TO_DISPLAY do + local button = _G['GuildFrameGuildStatusButton'..i] + if button and button.guildIndex then + local _, _, _, _, className, _, _, _, online = GetGuildRosterInfo(button.guildIndex) + local classFileName = online and E:UnlocalizedClassName(className) + if classFileName then + local classTextColor = E:ClassColor(classFileName) + _G['GuildFrameGuildStatusButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) + _G['GuildFrameGuildStatusButton'..i..'Online']:SetTextColor(1, 1, 1) + end + end + end + end +end + function S:FriendsFrame() if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.friends) then return end @@ -93,27 +208,11 @@ function S:FriendsFrame() _G.FriendsFrameBroadcastInputRight:Kill() _G.FriendsFrameBroadcastInputMiddle:Kill() - hooksecurefunc('FriendsFrame_CheckBattlenetStatus', function() - if BNFeaturesEnabled() then - FriendsFrameBattlenetFrame.BroadcastButton:Hide() - - if BNConnected() then - FriendsFrameBattlenetFrame:Hide() - _G.FriendsFrameBroadcastInput:Show() - _G.FriendsFrameBroadcastInput_UpdateDisplay() - end - end - end) + hooksecurefunc('FriendsFrame_CheckBattlenetStatus', CheckBattlenetStatus) _G.FriendsFrame_CheckBattlenetStatus() - hooksecurefunc('FriendsFrame_Update', function() - if FriendsFrame.selectedTab == 1 and _G.FriendsTabHeader.selectedTab == 1 and _G.FriendsFrameBattlenetFrame.Tag:IsShown() then - _G.FriendsFrameTitleText:Hide() - else - _G.FriendsFrameTitleText:Show() - end - end) + hooksecurefunc('FriendsFrame_Update', UpdateFriendsFrame) S:HandleEditBox(_G.AddFriendNameEditBox) _G.AddFriendFrame:SetTemplate('Transparent') @@ -131,16 +230,9 @@ function S:FriendsFrame() _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.RightArrow:SetPoint('LEFT', 11, 0) _G.FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.DownArrow:SetPoint('TOPLEFT', 8, -10) - hooksecurefunc(_G.FriendsFrameFriendsScrollFrame.invitePool, 'Acquire', function(pool) - if pool.activeObjects then - for object in pairs(pool.activeObjects) do - skinFriendRequest(object) - end - end - end) + hooksecurefunc(_G.FriendsFrameFriendsScrollFrame.invitePool, 'Acquire', AcquireInvitePool) S:HandleFrame(_G.FriendsFriendsFrame, true) - _G.FriendsFriendsList:StripTextures() _G.IgnoreListFrame:StripTextures() @@ -223,44 +315,7 @@ function S:FriendsFrame() className:Hide() end - hooksecurefunc('WhoList_Update', function() - local numWhos = C_FriendList_GetNumWhoResults() - if numWhos == 0 then return end - - if numWhos > _G.WHOS_TO_DISPLAY then - numWhos = _G.WHOS_TO_DISPLAY - end - - local playerZone = E.MapInfo.realZoneText - for i = 1, numWhos do - local button = _G['WhoFrameButton'..i] - if button and button.whoIndex then - local info = C_FriendList_GetWhoInfo(button.whoIndex) - if info.filename then - local classTextColor = E:ClassColor(info.filename) - _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) - - button.icon:Show() - button.icon:SetTexCoord(E:GetClassCoords(info.filename)) - else - local classTextColor = _G.HIGHLIGHT_FONT_COLOR - _G['WhoFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) - - button.icon:Hide() - end - - local levelTextColor = GetQuestDifficultyColor(info.level) - _G['WhoFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) - _G['WhoFrameButton'..i..'Class']:SetTextColor(1, 1, 1) - - if info.area == playerZone then - _G['WhoFrameButton'..i..'Variable']:SetTextColor(0, 1, 0) - else - _G['WhoFrameButton'..i..'Variable']:SetTextColor(1, 1, 1) - end - end - end - end) + hooksecurefunc('WhoList_Update', UpdateWhoList) -- Guild Frame (/groster) _G.GuildFrame:StripTextures() @@ -302,47 +357,7 @@ function S:FriendsFrame() statusName:SetPoint('LEFT', 10, 0) end - hooksecurefunc('GuildStatus_Update', function() - if FriendsFrame.playerStatusFrame then - local playerZone = E.MapInfo.realZoneText - for i = 1, GUILDMEMBERS_TO_DISPLAY do - local button = _G['GuildFrameButton'..i] - if button and button.guildIndex then - local _, _, _, level, className, zone, _, _, online = GetGuildRosterInfo(button.guildIndex) - local classFileName = E:UnlocalizedClassName(className) - if classFileName then - if online then - local classTextColor = E:ClassColor(classFileName) - local levelTextColor = GetQuestDifficultyColor(level) - _G['GuildFrameButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) - _G['GuildFrameButton'..i..'Level']:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b) - - if zone == playerZone then - _G['GuildFrameButton'..i..'Zone']:SetTextColor(0, 1, 0) - else - _G['GuildFrameButton'..i..'Zone']:SetTextColor(1, 1, 1) - end - end - - button.icon:SetTexCoord(E:GetClassCoords(classFileName)) - end - end - end - else - for i = 1, GUILDMEMBERS_TO_DISPLAY do - local button = _G['GuildFrameGuildStatusButton'..i] - if button and button.guildIndex then - local _, _, _, _, className, _, _, _, online = GetGuildRosterInfo(button.guildIndex) - local classFileName = online and E:UnlocalizedClassName(className) - if classFileName then - local classTextColor = E:ClassColor(classFileName) - _G['GuildFrameGuildStatusButton'..i..'Name']:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b) - _G['GuildFrameGuildStatusButton'..i..'Online']:SetTextColor(1, 1, 1) - end - end - end - end - end) + hooksecurefunc('GuildStatus_Update', UpdateGuildStatus) S:HandleFrame(_G.GuildFrameLFGFrame, true) S:HandleCheckBox(_G.GuildFrameLFGButton) @@ -449,9 +464,7 @@ function S:FriendsFrame() -- Raid Info Frame _G.RaidInfoFrame:StripTextures(true) _G.RaidInfoFrame:CreateBackdrop('Transparent') - _G.RaidInfoFrame:HookScript('OnShow', function() - _G.RaidInfoFrame:Point('TOPLEFT', _G.RaidFrame, 'TOPRIGHT', 0, 0) - end) + _G.RaidInfoFrame:HookScript('OnShow', RaidInfoFrame_OnShow) _G.RaidInfoScrollFrame:StripTextures() S:HandleScrollBar(_G.RaidInfoScrollFrameScrollBar) From 4855ef3e04d5bee4a8e58d88e84199601103f28c Mon Sep 17 00:00:00 2001 From: Simpy Date: Thu, 14 Nov 2024 14:32:34 -0500 Subject: [PATCH 06/14] retail one too --- ElvUI/Mainline/Modules/Skins/Friends.lua | 172 ++++++++++++----------- 1 file changed, 91 insertions(+), 81 deletions(-) diff --git a/ElvUI/Mainline/Modules/Skins/Friends.lua b/ElvUI/Mainline/Modules/Skins/Friends.lua index 04b832b2f5..b975172073 100644 --- a/ElvUI/Mainline/Modules/Skins/Friends.lua +++ b/ElvUI/Mainline/Modules/Skins/Friends.lua @@ -11,6 +11,8 @@ local hooksecurefunc = hooksecurefunc local WhoFrameColumn_SetWidth = WhoFrameColumn_SetWidth local FriendsFrame_GetInviteRestriction = FriendsFrame_GetInviteRestriction +local INVITE_RESTRICTION_NONE = 9 + --Social Frame local function SkinSocialHeaderTab(tab) if not tab then return end @@ -42,9 +44,9 @@ local function RAFRewardQuality(button) end local function RAFRewards() - local Claiming = _G.RecruitAFriendFrame.RewardClaiming - if Claiming and Claiming.NextRewardButton then - Claiming.NextRewardButton.Icon:SetDesaturation(0) + local claiming = _G.RecruitAFriendFrame.RewardClaiming + if claiming and claiming.NextRewardButton then + claiming.NextRewardButton.Icon:SetDesaturation(0) end for reward in _G.RecruitAFriendRewardsFrame.rewardPool:EnumerateActive() do @@ -61,18 +63,20 @@ local function RAFRewards() RAFRewardQuality(button) local text = reward.Months - text:SetTextColor(1, 1, 1) + if text then + text:SetTextColor(1, 1, 1) + end end end -local atlasToTex = { +local InviteAtlas = { ['friendslist-invitebutton-horde-normal'] = [[Interface\FriendsFrame\PlusManz-Horde]], ['friendslist-invitebutton-alliance-normal'] = [[Interface\FriendsFrame\PlusManz-Alliance]], ['friendslist-invitebutton-default-normal'] = [[Interface\FriendsFrame\PlusManz-PlusManz]], } local function HandleInviteTex(self, atlas) - local tex = atlasToTex[atlas] + local tex = InviteAtlas[atlas] if tex then self.ownerIcon:SetTexture(tex) end @@ -89,6 +93,7 @@ local function ReskinFriendButton(button) summon.highlightTexture = summon:GetHighlightTexture() -- the other one is different (HighlightTexture) summon.highlightTexture:SetTexture(136222) + summon.PushedTexture:SetTexture(136222) summon.NormalTexture:SetTexture(136222) summon.PushedTexture:SetBlendMode('ADD') @@ -156,6 +161,80 @@ local function HandleTabs() end end +local function UpdateFriendButton(button) + if button.gameIcon then + ReskinFriendButton(button) + end + + if button.newIcon and button.buttonType == _G.FRIENDS_BUTTON_TYPE_BNET then + if FriendsFrame_GetInviteRestriction(button.id) == INVITE_RESTRICTION_NONE then + button.newIcon:SetVertexColor(1, 1, 1) + else + button.newIcon:SetVertexColor(.5, .5, .5) + end + end +end + +local function UpdateFriendInviteButton(button) + if not button.IsSkinned then + S:HandleButton(button.AcceptButton) + S:HandleButton(button.DeclineButton) + + button.IsSkinned = true + end +end + +local function UpdateFriendInviteHeaderButton(button) + if not button.IsSkinned then + button:DisableDrawLayer('BACKGROUND') + button:CreateBackdrop('Transparent') + button.backdrop:SetInside(button, 2, 2) + + local highlight = button:GetHighlightTexture() + if highlight then + highlight:SetColorTexture(.24, .56, 1, .2) + highlight:SetInside(button.backdrop) + end + + button.IsSkinned = true + end +end + +local StripAllTextures = { + 'FriendsTabHeaderTab1', + 'FriendsTabHeaderTab2', + 'WhoFrameColumnHeader1', + 'WhoFrameColumnHeader2', + 'WhoFrameColumnHeader3', + 'WhoFrameColumnHeader4', + 'AddFriendFrame', +} + +local ButtonsToHandle = { + 'FriendsFrameAddFriendButton', + 'FriendsFrameSendMessageButton', + 'WhoFrameWhoButton', + 'WhoFrameAddFriendButton', + 'WhoFrameGroupInviteButton', + 'FriendsFrameIgnorePlayerButton', + 'FriendsFrameUnsquelchButton', + 'AddFriendEntryFrameAcceptButton', + 'AddFriendEntryFrameCancelButton', + 'AddFriendInfoFrameContinueButton', +} + +local EditBoxBorders = { + 'BottomBorder', + 'BottomLeftBorder', + 'BottomRightBorder', + 'LeftBorder', + 'MiddleBorder', + 'RightBorder', + 'TopBorder', + 'TopLeftBorder', + 'TopRightBorder' +} + function S:FriendsFrame() if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.friends) then return end @@ -165,30 +244,7 @@ function S:FriendsFrame() S:HandleTrimScrollBar(_G.FriendsFriendsFrame.ScrollBar) S:HandleTrimScrollBar(_G.QuickJoinFrame.ScrollBar) - local StripAllTextures = { - 'FriendsTabHeaderTab1', - 'FriendsTabHeaderTab2', - 'WhoFrameColumnHeader1', - 'WhoFrameColumnHeader2', - 'WhoFrameColumnHeader3', - 'WhoFrameColumnHeader4', - 'AddFriendFrame', - } - - local buttons = { - 'FriendsFrameAddFriendButton', - 'FriendsFrameSendMessageButton', - 'WhoFrameWhoButton', - 'WhoFrameAddFriendButton', - 'WhoFrameGroupInviteButton', - 'FriendsFrameIgnorePlayerButton', - 'FriendsFrameUnsquelchButton', - 'AddFriendEntryFrameAcceptButton', - 'AddFriendEntryFrameCancelButton', - 'AddFriendInfoFrameContinueButton', - } - - for _, button in pairs(buttons) do + for _, button in pairs(ButtonsToHandle) do S:HandleButton(_G[button]) end @@ -238,65 +294,19 @@ function S:FriendsFrame() S:HandleButton(FriendsFrameBattlenetFrame.BroadcastFrame.UpdateButton) S:HandleButton(FriendsFrameBattlenetFrame.BroadcastFrame.CancelButton) - local editBoxBorders = { - 'BottomBorder', - 'BottomLeftBorder', - 'BottomRightBorder', - 'LeftBorder', - 'MiddleBorder', - 'RightBorder', - 'TopBorder', - 'TopLeftBorder', - 'TopRightBorder' - } - local broadcastEdit = FriendsFrameBattlenetFrame.BroadcastFrame.EditBox - for _, name in next, editBoxBorders do + for _, name in next, EditBoxBorders do local region = broadcastEdit[name] if region then region:Hide() end end S:HandleEditBox(broadcastEdit) - S:HandleEditBox(_G.AddFriendNameEditBox) _G.AddFriendFrame:SetTemplate('Transparent') - local INVITE_RESTRICTION_NONE = 9 - hooksecurefunc('FriendsFrame_UpdateFriendButton', function(button) - if button.gameIcon then - ReskinFriendButton(button) - end - - if button.newIcon and button.buttonType == _G.FRIENDS_BUTTON_TYPE_BNET then - if FriendsFrame_GetInviteRestriction(button.id) == INVITE_RESTRICTION_NONE then - button.newIcon:SetVertexColor(1, 1, 1) - else - button.newIcon:SetVertexColor(.5, .5, .5) - end - end - end) - - hooksecurefunc('FriendsFrame_UpdateFriendInviteButton', function(button) - if not button.IsSkinned then - S:HandleButton(button.AcceptButton) - S:HandleButton(button.DeclineButton) - - button.IsSkinned = true - end - end) - - hooksecurefunc('FriendsFrame_UpdateFriendInviteHeaderButton', function(button) - if not button.IsSkinned then - button:DisableDrawLayer('BACKGROUND') - button:CreateBackdrop('Transparent') - button.backdrop:SetInside(button, 2, 2) - local hl = button:GetHighlightTexture() - hl:SetColorTexture(.24, .56, 1, .2) - hl:SetInside(button.backdrop) - - button.IsSkinned = true - end - end) + hooksecurefunc('FriendsFrame_UpdateFriendButton', UpdateFriendButton) + hooksecurefunc('FriendsFrame_UpdateFriendInviteButton', UpdateFriendInviteButton) + hooksecurefunc('FriendsFrame_UpdateFriendInviteHeaderButton', UpdateFriendInviteHeaderButton) --Who Frame _G.WhoFrame:StripTextures() @@ -310,7 +320,7 @@ function S:FriendsFrame() _G.WhoFrameEditBox.backdrop:Point('BOTTOMRIGHT', _G.WhoFrameEditBoxInset, -1, 1) --Increase width of Level column slightly - WhoFrameColumn_SetWidth(_G.WhoFrameColumnHeader3, 37) --Default is 32 + WhoFrameColumn_SetWidth(_G.WhoFrameColumnHeader3, 37) -- Default is 32 for i = 1, 17 do local level = _G['WhoFrameButton'..i..'Level'] if level then From da80237b117f53ea199da1e0e1332377a37743c6 Mon Sep 17 00:00:00 2001 From: Simpy Date: Thu, 14 Nov 2024 14:33:33 -0500 Subject: [PATCH 07/14] missed one --- ElvUI/Mainline/Modules/Skins/Friends.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ElvUI/Mainline/Modules/Skins/Friends.lua b/ElvUI/Mainline/Modules/Skins/Friends.lua index b975172073..de924dfb87 100644 --- a/ElvUI/Mainline/Modules/Skins/Friends.lua +++ b/ElvUI/Mainline/Modules/Skins/Friends.lua @@ -36,6 +36,10 @@ local function BattleNetFrame_OnLeave(button) button.backdrop:SetBackdropBorderColor(unpack(E.media.bordercolor)) end +local function BattleNetFrame_OnClick() + _G.FriendsFrameBattlenetFrame.BroadcastFrame:ToggleFrame() +end + local function RAFRewardQuality(button) local color = button.item and button.item:GetItemQualityColor() if color and button.Icon then @@ -276,12 +280,11 @@ function S:FriendsFrame() BattlenetFrame:SetBackdropColor(bnetColor.r, bnetColor.g, bnetColor.b, bnetColor.a) BattlenetFrame:SetBackdropBorderColor(unpack(E.media.bordercolor)) - BattlenetFrame:SetScript('OnClick', function() FriendsFrameBattlenetFrame.BroadcastFrame:ToggleFrame() end) + BattlenetFrame:SetScript('OnClick', BattleNetFrame_OnClick) BattlenetFrame:SetScript('OnEnter', BattleNetFrame_OnEnter) BattlenetFrame:SetScript('OnLeave', BattleNetFrame_OnLeave) FriendsFrameBattlenetFrame.BroadcastButton:Kill() -- We use the BattlenetFrame to enter a Status Message - FriendsFrameBattlenetFrame.UnavailableInfoFrame.Bg:SetTexture(nil) FriendsFrameBattlenetFrame.UnavailableInfoFrame:SetTemplate('Transparent') FriendsFrameBattlenetFrame.UnavailableInfoFrame:ClearAllPoints() From 004fc436668dc2b4a0dc2fbf14944732b9e06fb8 Mon Sep 17 00:00:00 2001 From: Luckyone Date: Fri, 15 Nov 2024 18:22:14 +0100 Subject: [PATCH 08/14] "New" Classic LFG Frame Skin --- ElvUI/Classic/Modules/Skins/LFG.lua | 144 +++++++++++++++++++++ ElvUI/Classic/Modules/Skins/Load_Skins.xml | 1 + ElvUI_Options/Core/Skins.lua | 2 +- 3 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 ElvUI/Classic/Modules/Skins/LFG.lua diff --git a/ElvUI/Classic/Modules/Skins/LFG.lua b/ElvUI/Classic/Modules/Skins/LFG.lua new file mode 100644 index 0000000000..93a076b337 --- /dev/null +++ b/ElvUI/Classic/Modules/Skins/LFG.lua @@ -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') diff --git a/ElvUI/Classic/Modules/Skins/Load_Skins.xml b/ElvUI/Classic/Modules/Skins/Load_Skins.xml index ed2eeee8bb..c0711b4391 100644 --- a/ElvUI/Classic/Modules/Skins/Load_Skins.xml +++ b/ElvUI/Classic/Modules/Skins/Load_Skins.xml @@ -22,6 +22,7 @@