zAmmo low-ammo flash + usage tracker; zPet unhappy flash; split parent/child tooltips

This commit is contained in:
DuvelCorp
2026-10-08 08:10:17 +02:00
parent 69c6d44b8e
commit 14f33b35ca
5 changed files with 369 additions and 1 deletions
+12 -1
View File
@@ -797,7 +797,11 @@ function ZSpellButtonParent_OnEnter(frame)
ZSpellButton_SetChildrenExpanded(frame, true)
end
ZSpellButton_ResetFadeTimer(frame)
if frame.tooltip and frame.id then
local showParentTooltip = frame.parentTooltip
if showParentTooltip == nil then
showParentTooltip = frame.tooltip
end
if showParentTooltip and frame.id then
GameTooltip:SetOwner(frame, "ANCHOR_TOPLEFT")
local msg, rank
@@ -807,6 +811,9 @@ function ZSpellButtonParent_OnEnter(frame)
msg = msg.." ("..rank..")"
end
GameTooltip:SetText(msg, 1, 1, 1)
elseif frame.suppressItemTooltip then
GameTooltip:ClearLines()
GameTooltip:SetText(frame.ammoname or frame.ammolink or "Ammo", 1, 1, 1)
else
local showedItemTooltip = nil
if frame.ammobag and frame.ammoslot and type(GameTooltip.SetBagItem) == "function" then
@@ -838,6 +845,10 @@ function ZSpellButtonParent_OnEnter(frame)
end
end
if type(frame.extraTooltip) == "function" then
frame.extraTooltip(GameTooltip)
end
GameTooltip:AddLine("Alt+Drag To Move This Button")
GameTooltip:Show()
end