Skip to content

Commit

Permalink
make toasts great again
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Komarov committed Aug 24, 2024
1 parent fc5f1dc commit 91eadad
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions Modules/Tooltip/Tooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -800,19 +800,22 @@ function TT:Initialize()
TT:SecureHook(SocialToastFrame, "SetPoint", "RepositionSocialToast")
elseif SocialToastAnchorFrame then
hooksecurefunc(SocialToastAnchorFrame, "ShowToast", function(self)
if self.toastFrames then
for _, toastFrame in ipairs(self.toastFrames) do
if not toastFrame.isSkinned then
toastFrame:SetTemplate("Transparent")
S:HandleIcon(toastFrame.Icon)
toastFrame.backdrop:SetFrameLevel(toastFrame:GetFrameLevel() + 2)
toastFrame.Icon:SetParent(toastFrame.backdrop)
S:HandleCloseButton(toastFrame.CloseButton)

toastFrame.isSkinned = true
if type(self) == "table" then
if self.activeToasts and type(self.activeToasts) == "table" then
for key, toastFrame in pairs(self.activeToasts) do
if type(toastFrame) == "table" then
if not toastFrame.isSkinned then
toastFrame:SetTemplate("Transparent")
S:HandleIcon(toastFrame.Icon)
toastFrame.backdrop:SetFrameLevel(toastFrame:GetFrameLevel() + 2)
toastFrame.Icon:SetParent(toastFrame.backdrop)
S:HandleCloseButton(toastFrame.CloseButton)

toastFrame.isSkinned = true
end
toastFrame.Icon:SetTexCoord(unpack(E.TexCoords))
end
end

toastFrame.Icon:SetTexCoord(unpack(E.TexCoords))
end
end
end)
Expand Down

0 comments on commit 91eadad

Please sign in to comment.