From 26b5cf543d1fc23a2de63c4aeeaa9ca81567215b Mon Sep 17 00:00:00 2001 From: Merathilis Date: Fri, 20 Dec 2024 19:46:50 +0100 Subject: [PATCH 1/4] Updated an Arrow Texture on the Wardrobe Skin. This thing needed some special treatment >.> --- ElvUI/Mainline/Modules/Skins/Collectables.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ElvUI/Mainline/Modules/Skins/Collectables.lua b/ElvUI/Mainline/Modules/Skins/Collectables.lua index fdc7066228..d9ac374c10 100644 --- a/ElvUI/Mainline/Modules/Skins/Collectables.lua +++ b/ElvUI/Mainline/Modules/Skins/Collectables.lua @@ -684,7 +684,20 @@ local function SkinTransmogFrames() end end - S:HandleButton(WardrobeTransmogFrame.SpecDropdown) + local specButton = WardrobeTransmogFrame.SpecDropdown + if specButton then + S:HandleButton(specButton) + if specButton.Arrow then specButton.Arrow:SetAlpha(0) end + specButton:SetPoint('RIGHT', WardrobeTransmogFrame.ApplyButton, 'LEFT', -3, 0) + + if not specButton.CustomArrow then + local tex = specButton:CreateTexture(nil, 'ARTWORK') + tex:SetAllPoints() + tex:SetTexture(E.Media.Textures.ArrowUp) + tex:SetRotation(S.ArrowRotation.down) + end + end + S:HandleButton(WardrobeTransmogFrame.ApplyButton) S:HandleButton(WardrobeTransmogFrame.ModelScene.ClearAllPendingButton) S:HandleCheckBox(WardrobeTransmogFrame.ToggleSecondaryAppearanceCheckbox) From ad64ce5f7ea5f9fef41bef93ac7f785d99823371 Mon Sep 17 00:00:00 2001 From: Simpy Date: Fri, 20 Dec 2024 20:48:08 -0500 Subject: [PATCH 2/4] fix HandleRewardButton error --- ElvUI/Core/Modules/Skins/Skins.lua | 1 + ElvUI/Mainline/Modules/Skins/GenericTrait.lua | 7 +++++-- ElvUI/Mainline/Modules/Skins/PerksProgram.lua | 18 ++++++++++++++---- ElvUI/Mainline/Modules/Skins/Stable.lua | 16 ++-------------- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/ElvUI/Core/Modules/Skins/Skins.lua b/ElvUI/Core/Modules/Skins/Skins.lua index 99dc8482e6..00220de97d 100644 --- a/ElvUI/Core/Modules/Skins/Skins.lua +++ b/ElvUI/Core/Modules/Skins/Skins.lua @@ -744,6 +744,7 @@ do function S:HandleModelSceneControlButtons(frame) if not frame.IsSkinned then frame.IsSkinned = true + hooksecurefunc(frame, 'UpdateLayout', UpdateLayout) end end diff --git a/ElvUI/Mainline/Modules/Skins/GenericTrait.lua b/ElvUI/Mainline/Modules/Skins/GenericTrait.lua index ec8d55d471..943d8c6ae9 100644 --- a/ElvUI/Mainline/Modules/Skins/GenericTrait.lua +++ b/ElvUI/Mainline/Modules/Skins/GenericTrait.lua @@ -16,8 +16,11 @@ function S:Blizzard_GenericTraitUI() GenericTrait:SetTemplate('Transparent') S:HandleCloseButton(GenericTrait.CloseButton) - S.ReplaceIconString(GenericTrait.Currency.UnspentPointsCount) - hooksecurefunc(GenericTrait.Currency.UnspentPointsCount, 'SetText', S.ReplaceIconString) + local unspentCount = GenericTrait.Currency.UnspentPointsCount + if unspentCount then + S.ReplaceIconString(unspentCount) + hooksecurefunc(unspentCount, 'SetText', S.ReplaceIconString) + end end S:AddCallbackForAddon('Blizzard_GenericTraitUI') diff --git a/ElvUI/Mainline/Modules/Skins/PerksProgram.lua b/ElvUI/Mainline/Modules/Skins/PerksProgram.lua index 965b0c8c96..76223f9dd3 100644 --- a/ElvUI/Mainline/Modules/Skins/PerksProgram.lua +++ b/ElvUI/Mainline/Modules/Skins/PerksProgram.lua @@ -21,12 +21,22 @@ end local function HandleRewardButton(box) local container = box.ContentsContainer - if container and not container.IsSkinned then - container.IsSkinned = true + if not container then return end + local icon = container.Icon + if icon then S:HandleIcon(container.Icon) - S.ReplaceIconString(container.Price) - hooksecurefunc(container.Price, 'SetText', S.ReplaceIconString) + end + + local price = container.Price + if price then + S.ReplaceIconString(price) + + if not price.IsSkinned then + price.IsSkinned = true + + hooksecurefunc(price, 'SetText', S.ReplaceIconString) + end end end diff --git a/ElvUI/Mainline/Modules/Skins/Stable.lua b/ElvUI/Mainline/Modules/Skins/Stable.lua index 1c1c0f0d6f..7f951b38f6 100644 --- a/ElvUI/Mainline/Modules/Skins/Stable.lua +++ b/ElvUI/Mainline/Modules/Skins/Stable.lua @@ -55,20 +55,8 @@ function S:Blizzard_StableUI() end local petInfo = modelScene.PetInfo - if petInfo then - if petInfo.Type then - hooksecurefunc(petInfo.Type, 'SetText', S.ReplaceIconString) - end - - --[[ this sucks need something better; pushed also broke - local editButton = petInfo.NameBox.EditButton - if editButton then - local icon = editButton.Icon:GetAtlas() - S:HandleButton(editButton) - editButton.Icon:SetAtlas(icon) - editButton.Icon:SetTexCoord(.22, .8, .22, .8) - end - ]] + if petInfo and petInfo.Type then + hooksecurefunc(petInfo.Type, 'SetText', S.ReplaceIconString) end end From e584263f2dc98ec3988a27369fb2e08d0ba60d7b Mon Sep 17 00:00:00 2001 From: Simpy Date: Fri, 20 Dec 2024 21:00:48 -0500 Subject: [PATCH 3/4] arrange this a bit --- ElvUI/Mainline/Modules/Skins/Collectables.lua | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/ElvUI/Mainline/Modules/Skins/Collectables.lua b/ElvUI/Mainline/Modules/Skins/Collectables.lua index d9ac374c10..d37fd7d93d 100644 --- a/ElvUI/Mainline/Modules/Skins/Collectables.lua +++ b/ElvUI/Mainline/Modules/Skins/Collectables.lua @@ -684,17 +684,23 @@ local function SkinTransmogFrames() end end - local specButton = WardrobeTransmogFrame.SpecDropdown - if specButton then - S:HandleButton(specButton) - if specButton.Arrow then specButton.Arrow:SetAlpha(0) end - specButton:SetPoint('RIGHT', WardrobeTransmogFrame.ApplyButton, 'LEFT', -3, 0) - - if not specButton.CustomArrow then - local tex = specButton:CreateTexture(nil, 'ARTWORK') + local SpecButton = WardrobeTransmogFrame.SpecDropdown + if SpecButton then + S:HandleButton(SpecButton) + + SpecButton:SetPoint('RIGHT', WardrobeTransmogFrame.ApplyButton, 'LEFT', -3, 0) + + if SpecButton.Arrow then + SpecButton.Arrow:SetAlpha(0) + end + + if not SpecButton.customArrow then + local tex = SpecButton:CreateTexture(nil, 'ARTWORK') tex:SetAllPoints() tex:SetTexture(E.Media.Textures.ArrowUp) tex:SetRotation(S.ArrowRotation.down) + + SpecButton.customArrow = tex end end From 83c38fe02f92cd80072f43d2c1ac98c3f72f26c3 Mon Sep 17 00:00:00 2001 From: Simpy Date: Fri, 20 Dec 2024 21:02:50 -0500 Subject: [PATCH 4/4] s --- ElvUI/Mainline/Modules/Skins/GenericTrait.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/ElvUI/Mainline/Modules/Skins/GenericTrait.lua b/ElvUI/Mainline/Modules/Skins/GenericTrait.lua index 943d8c6ae9..d3697ab18c 100644 --- a/ElvUI/Mainline/Modules/Skins/GenericTrait.lua +++ b/ElvUI/Mainline/Modules/Skins/GenericTrait.lua @@ -19,6 +19,7 @@ function S:Blizzard_GenericTraitUI() local unspentCount = GenericTrait.Currency.UnspentPointsCount if unspentCount then S.ReplaceIconString(unspentCount) + hooksecurefunc(unspentCount, 'SetText', S.ReplaceIconString) end end