Skip to content

Commit

Permalink
Merge branch 'main' into ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Dec 21, 2024
2 parents 54a344f + 83c38fe commit f1ecd44
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 21 deletions.
1 change: 1 addition & 0 deletions ElvUI/Core/Modules/Skins/Skins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,7 @@ do
function S:HandleModelSceneControlButtons(frame)
if not frame.IsSkinned then
frame.IsSkinned = true

hooksecurefunc(frame, 'UpdateLayout', UpdateLayout)
end
end
Expand Down
21 changes: 20 additions & 1 deletion ElvUI/Mainline/Modules/Skins/Collectables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,26 @@ local function SkinTransmogFrames()
end
end

S:HandleButton(WardrobeTransmogFrame.SpecDropdown)
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

S:HandleButton(WardrobeTransmogFrame.ApplyButton)
S:HandleButton(WardrobeTransmogFrame.ModelScene.ClearAllPendingButton)
S:HandleCheckBox(WardrobeTransmogFrame.ToggleSecondaryAppearanceCheckbox)
Expand Down
8 changes: 6 additions & 2 deletions ElvUI/Mainline/Modules/Skins/GenericTrait.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ 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')
18 changes: 14 additions & 4 deletions ElvUI/Mainline/Modules/Skins/PerksProgram.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 2 additions & 14 deletions ElvUI/Mainline/Modules/Skins/Stable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f1ecd44

Please sign in to comment.