From 79f09e7a2e5bed471541de82ffa54f2137060bec Mon Sep 17 00:00:00 2001 From: Scott Sibley Date: Wed, 27 Oct 2010 22:26:50 +0000 Subject: [PATCH] ShowTooltip has a new argument -- unit. If it is not provided, StarTip.unit is used, otherwise "mouseover" is used. --- StarTip.lua | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/StarTip.lua b/StarTip.lua index 86d53bc..85fc2ff 100644 --- a/StarTip.lua +++ b/StarTip.lua @@ -617,12 +617,12 @@ function StarTip:HideTooltip() self.tooltipHidden = true end -function StarTip:ShowTooltip() +function StarTip:ShowTooltip(unit) self.tooltipHidden = false - + unit = unit or StarTip.unit or "mouseover" GameTooltip:Hide() GameTooltip_SetDefaultAnchor(GameTooltip, UIParent) - GameTooltip:SetUnit(StarTip.unit or "mouseover") + GameTooltip:SetUnit(unit) GameTooltip:Show() end @@ -780,17 +780,13 @@ function StarTip:GameTooltipShow(...) if not show or StarTip.tooltipHidden then GameTooltip:Hide(); return end - --[[ for k, v in StarTip:IterateModules() do if v.GameTooltipShow and v:IsEnabled() then show = show and v:GameTooltipShow(...) end - end]] + end if show then - --GameTooltip:SetOwner(WorldFrame, "ANCHOR_CURSOR") - --GameTooltip:SetParent(UIParent) - --GameTooltip:SetUnit(StarTip.unit or "mouseover") StarTip.hooks[GameTooltip].Show(...) end end -- 1.7.9.5