Skip to content

Commit

Permalink
p t r
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Apr 13, 2024
1 parent 26e5a92 commit dc36bef
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 43 deletions.
5 changes: 2 additions & 3 deletions ElvUI/Core/Modules/Skins/Skins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ local LibStub = _G.LibStub
local _G = _G
local hooksecurefunc = hooksecurefunc
local tinsert, xpcall, next, ipairs, pairs = tinsert, xpcall, next, ipairs, pairs
local unpack, assert, type, strfind = unpack, assert, type, strfind
local unpack, assert, type, gsub, strfind = unpack, assert, type, gsub, strfind

local CreateFrame = CreateFrame

local IsAddOnLoaded = (C_AddOns and C_AddOns.IsAddOnLoaded) or IsAddOnLoaded

local ITEM_QUALITY_COLORS = ITEM_QUALITY_COLORS
Expand Down Expand Up @@ -1289,7 +1288,7 @@ do
end
end

function S.ReplaceIconString(self, text)
function S:ReplaceIconString(text)
if not text then text = self:GetText() end
if not text or text == '' then return end

Expand Down
1 change: 0 additions & 1 deletion ElvUI/Mainline/Modules/Skins/GenericTrait.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ local E, L, V, P, G = unpack(ElvUI)
local S = E:GetModule('Skins')

local _G = _G
local gsub = gsub
local hooksecurefunc = hooksecurefunc

function S:Blizzard_GenericTraitUI()
Expand Down
45 changes: 28 additions & 17 deletions ElvUI/Mainline/Modules/Skins/LFG.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ local C_ChallengeMode_GetMapUIInfo = C_ChallengeMode.GetMapUIInfo

local LE_PARTY_CATEGORY_HOME = LE_PARTY_CATEGORY_HOME

local groupButtonIcons = {
133076, -- interface\icons\inv_helmet_08.blp
133074, -- interface\icons\inv_helmet_06.blp
464820 -- interface\icons\achievement_general_stayclassy.blp
}

local function LFDQueueFrameRoleButtonIconOnShow(self)
LCG.ShowOverlayGlow(self:GetParent().checkButton)
end
Expand Down Expand Up @@ -128,10 +134,6 @@ function S:LookingForGroupFrames()
S:HandleButton(_G.LFDQueueFramePartyBackfillBackfillButton)
S:HandleButton(_G.LFDQueueFramePartyBackfillNoBackfillButton)

_G.GroupFinderFrame.groupButton1.icon:SetTexture(133076) -- interface\icons\inv_helmet_08.blp
_G.GroupFinderFrame.groupButton2.icon:SetTexture(133074) -- interface\icons\inv_helmet_06.blp
_G.GroupFinderFrame.groupButton3.icon:SetTexture(464820) -- interface\icons\achievement_general_stayclassy.blp

_G.LFGDungeonReadyStatus:StripTextures()
_G.LFGDungeonReadyStatus:SetTemplate('Transparent')

Expand Down Expand Up @@ -261,18 +263,26 @@ function S:LookingForGroupFrames()
end
end)

for i = 1, 4 do
local bu = _G.GroupFinderFrame['groupButton'..i]
do
local index = 1
local button = _G.GroupFinderFrame['groupButton'..index]
while button do
button.ring:Hide()
button.bg:Kill()
S:HandleButton(button)

local texture = groupButtonIcons[index]
if texture then
button.icon:SetTexture(texture)
end

if bu then
bu.ring:Hide()
bu.bg:Kill()
S:HandleButton(bu)
button.icon:Size(45)
button.icon:ClearAllPoints()
button.icon:Point('LEFT', 10, 0)
S:HandleIcon(button.icon, true)

bu.icon:Size(45)
bu.icon:ClearAllPoints()
bu.icon:Point('LEFT', 10, 0)
S:HandleIcon(bu.icon, true)
index = index + 1
button = _G.GroupFinderFrame['groupButton'..index]
end
end

Expand All @@ -295,11 +305,12 @@ function S:LookingForGroupFrames()
_G.ScenarioFinderFrameInset:StripTextures()
_G.ScenarioQueueFrameBackground:SetAlpha(0)
S:HandleDropDownBox(_G.ScenarioQueueFrameTypeDropDown)
if ScenarioQueueFrameRandomScrollFrameScrollBar then
ScenarioQueueFrameRandomScrollFrameScrollBar:SetAlpha(0)
end
S:HandleTrimScrollBar(_G.ScenarioQueueFrameRandomScrollFrame.ScrollBar)
S:HandleButton(_G.ScenarioQueueFrameFindGroupButton)

if _G.ScenarioQueueFrameRandomScrollFrameScrollBar then
_G.ScenarioQueueFrameRandomScrollFrameScrollBar:SetAlpha(0)
end
end

-- Raid finder
Expand Down
1 change: 0 additions & 1 deletion ElvUI/Mainline/Modules/Skins/PerksProgram.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ local E, L, V, P, G = unpack(ElvUI)
local S = E:GetModule('Skins')

local _G = _G
local gsub = gsub
local hooksecurefunc = hooksecurefunc

local function HandleRewardButton(box)
Expand Down
25 changes: 15 additions & 10 deletions ElvUI/Mainline/Modules/Skins/Stable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ local E, L, V, P, G = unpack(ElvUI)
local S = E:GetModule('Skins')

local _G = _G
local hooksecurefunc = hooksecurefunc

local function AbilitiesList_Layout(list)
if not list.abilityPool then return end

for frame in list.abilityPool:EnumerateActive() do
if not frame.IsSkinned then
S:HandleIcon(frame.Icon)
frame.IsSkinned = true
end
end
end

function S:Blizzard_StableUI()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.stable) then return end
Expand Down Expand Up @@ -29,16 +41,9 @@ function S:Blizzard_StableUI()
--S:HandleButton(PetInfo.NameBox.EditButton) -- ToDo: 10.2.7: Halp, Fix me
end

local StableList = StableModelScene.AbilitiesList
if StableList then
hooksecurefunc(StableList, 'Layout', function(self)
for frame in self.abilityPool:EnumerateActive() do
if not frame.IsSkinned then
S:HandleIcon(frame.Icon)
frame.IsSkinned = true
end
end
end)
local AbilitiesList = StableModelScene.AbilitiesList
if AbilitiesList then
hooksecurefunc(AbilitiesList, 'Layout', AbilitiesList_Layout)
end
end
S:HandleModelSceneControlButtons(StableModelScene.ControlFrame)
Expand Down
22 changes: 11 additions & 11 deletions ElvUI/Mainline/Modules/Skins/WeeklyRewards.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,11 @@ local E, L, V, P, G = unpack(ElvUI)
local S = E:GetModule('Skins')

local _G = _G
local gsub, pairs, unpack = gsub, pairs, unpack
local pairs, unpack = pairs, unpack
local hooksecurefunc = hooksecurefunc

-- Credits Siweia | AuroraClassic

local function UpdateSelection(frame)
if not frame.backdrop then return end

if frame.SelectedTexture:IsShown() then
frame.backdrop:SetBackdropBorderColor(1, .8, 0)
else
frame.backdrop:SetBackdropBorderColor(0, 0, 0)
end
end

local IconColor = E.QualityColors[Enum.ItemQuality.Epic or 4] -- epic color only
local function SkinRewardIcon(itemFrame)
if not itemFrame.IsSkinned then
Expand All @@ -29,6 +19,16 @@ local function SkinRewardIcon(itemFrame)
end
end

local function UpdateSelection(frame)
if not frame.backdrop then return end

if frame.SelectedTexture:IsShown() then
frame.backdrop:SetBackdropBorderColor(1, .8, 0)
else
frame.backdrop:SetBackdropBorderColor(0, 0, 0)
end
end

local function SkinActivityFrame(frame, isObject)
if frame.Border then
if isObject then
Expand Down

0 comments on commit dc36bef

Please sign in to comment.