Skip to content

Commit

Permalink
More updated to the new Stable Skin
Browse files Browse the repository at this point in the history
  • Loading branch information
Merathilis committed Apr 13, 2024
1 parent 3574d4f commit da630eb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
29 changes: 28 additions & 1 deletion ElvUI/Mainline/Modules/Skins/Stable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ local S = E:GetModule('Skins')

local _G = _G

local function ReplaceIconString(self, text)
if not text then text = self:GetText() end
if not text or text == "" then return end

local newText, count = gsub(text, "|T([^:]-):[%d+:]+|t", "|T%1:14:14:0:0:64:64:5:59:5:59|t")
if count > 0 then self:SetFormattedText("%s", newText) end
end

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

Expand All @@ -21,7 +29,26 @@ function S:Blizzard_StableUI()
S:HandleTrimScrollBar(StabledPetList.ScrollBar)

local StableModelScene = StableFrame.PetModelScene
--S:HandleButton(StableModelScene.PetInfo.NameBox.EditButton) -- ToDo: 10.2.7: Halp, Fix me
if StableModelScene then
local PetInfo = StableModelScene.PetInfo
if PetInfo then
hooksecurefunc(PetInfo.Type, 'SetText', ReplaceIconString)

--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)
end
end
S:HandleModelSceneControlButtons(StableModelScene.ControlFrame)
end

Expand Down
2 changes: 1 addition & 1 deletion ElvUI/Mainline/Modules/Skins/WeeklyRewards.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ local function ReplaceIconString(self, text)
if not text then text = self:GetText() end
if not text or text == '' then return end

local newText, count = gsub(text, '24:24:0:%-2', '14:14:0:0:64:64:5:59:5:59')
local newText, count = gsub(text, '|T([^:]-):[%d+:]+|t', '|T%1:14:14:0:0:64:64:5:59:5:59|t')
if count > 0 then self:SetFormattedText('%s', newText) end
end

Expand Down

0 comments on commit da630eb

Please sign in to comment.