fix: tooltip

This commit is contained in:
Salikh Gurgenidze
2025-12-28 00:52:51 +04:00
parent 89db6d04fa
commit 0b1b3e2dc0
5 changed files with 116 additions and 34 deletions
+14 -1
View File
@@ -1004,6 +1004,7 @@ function Guda_ItemButton_OnEnter(self)
-- Add mailbox metadata if available
local mailData = self.mailData
if mailData then
-- If we already added a line (for money/generic), or SetHyperlink/SetInboxItem added lines,
-- we might want a separator if we're adding sender info.
@@ -1027,6 +1028,17 @@ function Guda_ItemButton_OnEnter(self)
GameTooltip:AddLine("Days left: " .. math.floor(mailData.daysLeft), 0.5, 0.5, 0.5)
end
end
-- Add Inventory counts for mailbox items at the very bottom
if addon.Modules.Tooltip and addon.Modules.Tooltip.AddInventoryInfo then
local link = self.itemData and (self.itemData.link or (self.itemData.itemID and ("item:" .. self.itemData.itemID .. ":0:0:0")))
if not link and self.mailIndex and isMailboxOpen then
link = addon.Modules.Utils:GetInboxItemLink(self.mailIndex, self.mailItemIndex or 1)
end
if link then
addon.Modules.Tooltip:AddInventoryInfo(GameTooltip, link)
end
end
GameTooltip:Show()
return
@@ -1098,8 +1110,9 @@ end
-- OnLeave handler
function Guda_ItemButton_OnLeave(self)
-- Clear any viewed character hint on the tooltip when leaving
if GameTooltip and GameTooltip.GudaViewedCharacter then
if GameTooltip then
GameTooltip.GudaViewedCharacter = nil
GameTooltip.GudaInventoryAdded = nil
end
GameTooltip:Hide()
ResetCursor()