跟随版本 0.8.19
This commit is contained in:
10
Tooltip.lua
10
Tooltip.lua
@@ -332,6 +332,7 @@ function SFrames.FloatingTooltip:Initialize()
|
||||
-- OnUpdate: line formatting (once) + cursor tracking (every frame)
|
||||
local orig_OnUpdate = GameTooltip:GetScript("OnUpdate")
|
||||
local ttFormatThrottle = 0
|
||||
local ttHideGrace = 0
|
||||
GameTooltip:SetScript("OnUpdate", function()
|
||||
if orig_OnUpdate then orig_OnUpdate() end
|
||||
|
||||
@@ -342,12 +343,20 @@ function SFrames.FloatingTooltip:Initialize()
|
||||
local hasUnit = UnitExists("mouseover")
|
||||
|
||||
if ttHadUnit and not hasUnit then
|
||||
ttHideGrace = ttHideGrace + arg1
|
||||
if ttHideGrace < 0.2 then
|
||||
TT_ShowBar(false)
|
||||
return
|
||||
end
|
||||
ttHideGrace = 0
|
||||
TT_ShowBar(false)
|
||||
if GameTooltip._nanamiBGFrame then
|
||||
GameTooltip._nanamiBGFrame:Hide()
|
||||
end
|
||||
this:Hide()
|
||||
return
|
||||
else
|
||||
ttHideGrace = 0
|
||||
end
|
||||
|
||||
if not hasUnit then
|
||||
@@ -386,6 +395,7 @@ function SFrames.FloatingTooltip:Initialize()
|
||||
linesFormatted = false
|
||||
ttOwner = nil
|
||||
ttHadUnit = false
|
||||
ttHideGrace = 0
|
||||
TT_ShowBar(false)
|
||||
if GameTooltip._nanamiBGFrame then
|
||||
GameTooltip._nanamiBGFrame:Hide()
|
||||
|
||||
Reference in New Issue
Block a user