Skip to content

Commit

Permalink
Fixed weird black backgrounds with some masque skins.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cidan committed May 2, 2024
1 parent d45cd49 commit 9d69005
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions annotations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ MasqueGroup = {}

function MasqueGroup:AddButton(group, button) end
function MasqueGroup:RemoveButton(group, button) end
function MasqueGroup:ReSkin(boolean) end

---@class Masque
Masque = {}
Expand Down
2 changes: 2 additions & 0 deletions core/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ function addon:OnEnable()
events:RegisterMessage('items/RefreshBackpack/Done', function(_, args)
debug:Log("init/OnInitialize/items", "Drawing bag")
addon.Bags.Backpack:Draw(args[1])
events:SendMessage('bags/Draw/Backpack/Done')
end)

events:RegisterMessage('items/RefreshBank/Done', function(_, args)
Expand All @@ -231,6 +232,7 @@ function addon:OnEnable()
addon.Bags.Bank:Show()
end
addon.Bags.Bank:Draw(args[1])
events:SendMessage('bags/Draw/Bank/Done')
end)

events:RegisterEvent('PLAYER_REGEN_ENABLED', function()
Expand Down
10 changes: 10 additions & 0 deletions integrations/masque.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ function masque:OnEnable()
item.button.IconBorder:SetBlendMode("BLEND")
end)

events:RegisterMessage('bags/Draw/Backpack/Done', function()
local group = self.groups["Backpack"]
group:ReSkin(true)
end)

events:RegisterMessage('bags/Draw/Bank/Done', function()
local group = self.groups["Bank"]
group:ReSkin(true)
end)

events:RegisterMessage('item/Clearing', function(_, item)
---@cast item Item
local group = item.kind == 'Bank' and self.groups["Bank"] or self.groups["Backpack"]
Expand Down

0 comments on commit 9d69005

Please sign in to comment.