Looking for Help with EpicAdvice.com

We've recently published a new blog post explaining what's going on with EpicAdvice.com and are looking for someone to work with us to improve the site. If you're interested, have some ideas and want to know more, check out our blog post and feel free to email us at team@epicadvice.com. - Jesta

GameTooltip_SetDefaultAnchor

VOTES

1

does anyone know how to attach the tooltip to the mouse? i have a simple 3 line addon that does attach it (i will worry about offset after) but it is missing some hook or call or something because it disappears sometimes... (mouse quickly between player & pet frames or raid or party frames)

function GameTooltip_SetDefaultAnchor(tooltip, parent, ...)
  tooltip:SetOwner(parent, "ANCHOR_CURSOR")
end

what am i missing?

thanks a lot

the addon tiptac does this correctly and i am trying to comprehend it and figure out what it is doing different... but was wondering if anyone might know?

1 Answer(s)

Sort by... votes newest

VOTES

1

local function mouset_anchor(frame)
  local x, y = GetCursorPosition();
  local scale = frame:GetEffectiveScale();
  frame:ClearAllPoints();
  frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", (x/scale + 20), (y/scale + 20));
end

hooksecurefunc("GameTooltip_SetDefaultAnchor",
  function(tooltip, parent)
    tooltip:SetOwner(parent, "ANCHOR_NONE");
    mouset_anchor(tooltip);
  end
);

local function mouset_OnUpdate(self, elapsed)
  mouset_anchor(self);
end

GameTooltip:HookScript("OnUpdate", mouset_OnUpdate);

this works... hrm. maybe there is a bug with ANCHOR_CURSOR or

EpicAdvice.com Sponsors