[WotLK] Fade Time Doesn't Work for World Objects
stratoru opened this issue · 7 comments
Fading works correctly for all tooltips except for world objects, where it seems to use the default fade time.
To reproduce: hover over a world object (such as a campfire or brazier) and then move your mouse. It takes 3 seconds to fade out.
The relevant code is likely here:
TipTac/TipTacOptions/ttOptions.lua
Line 77 in 215c4d4
It seems that it's a possible blizzard bug, because the event CURSOR_UPDATE exists in classic, bcc and sl, but not in wotlkc. But registering to this event is needed to handle the world tooltips. With the current workaround I prevent the lua error here;
Lines 654 to 661 in 215c4d4
I believe that it being missing in WotLK is intentional, as it is also being removed in Dragonflight as well.
You're right. I considered this in the new release v22.09.17.
Hey @frozn, just a heads up, this was never fixed. It has been broken in Classic ever since. I actually found a workaround that fixed all issues with world frames. The issue was that world object tooltips would never hide if you right click the world frame while the tooltip was showing (and hadn't faded out instantly yet).
Upon right click (like when turning your character, or even when double clicking to run), the fade time would reset on the world tooltip back to full duration and not start over again until the right click was released. Super annoying bug.
Anyway, here was the fix I implemented into a custom code snippet (seperate from TipTac, I made just a basic addon solely for this purpose). Feel free to yoink it and edit it to fit your addon however you want!
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_LOGIN")
f:SetScript("OnEvent", function(self, event, ...)
if event == "PLAYER_LOGIN" then
self:RegisterEvent("GLOBAL_MOUSE_DOWN")
self:UnregisterEvent("PLAYER_LOGIN")
elseif event == "GLOBAL_MOUSE_DOWN" then
local button = ...
if button == "RightButton" then
GameTooltip:Hide()
for _, child in pairs({WorldFrame:GetChildren()}) do
if child and child.GetObjectType and child:GetObjectType() == "GameTooltip" and not child:IsProtected() and child:IsShown() then
child:Hide()
child:Show()
end
end
end
end
end)
Are you shure your modification is needed with the actual version of TipTac? I checked this for myself but the tooltips for world objects (e.g. mailboxes) fades out properly if I right click and move away from them. 🤔
I've seen this same issue myself but with World Units instead of World Objects.
If you hold a mouse button down on a player and take mouse off them then the default 3 sec fade will show up until you let go of the mouse button. Any mouse button replicates this behavior, not just RMB.