Skip to content

Commit

Permalink
Merge pull request #10 from AmonRay/main
Browse files Browse the repository at this point in the history
make toasts great again
  • Loading branch information
fxpw authored Aug 24, 2024
2 parents fc5f1dc + a6ab4da commit 4004b26
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ElvUI.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 30300
## Author: Elv, Bunny, fxpw
## Version: 7.60
## Version: 7.61
## Title: |cff1784d1E|r|cffe5e3e3lvUI|r for sirus
## Notes: User Interface replacement AddOn for World of Warcraft.
## SavedVariables: ElvDB, ElvPrivateDB, ElvSirusDB
Expand Down
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 _, 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 4004b26

Please sign in to comment.