| |
If you're an addon author who has hooked GameTooltip:SetUnit to add new content to the tooltip, you may notice that it's now stopped working in 1.7
My workaround has been this:
-- workaround un-hookability for mouseover
local oldScript = GameTooltip:GetScript("OnEvent");
local newScript =
function()
oldScript();
if (event == "UPDATE_MOUSEOVER_UNIT") then
CALL_YOUR_CODE_HERE(this);
end
end
GameTooltip:SetScript("OnEvent", newScript);
That seems to work pretty well, when your code is called the tooltip is already rendered and shown, so you just add your own text then :Show() again to resize.
If anyone has a better idea, please do let me know.
> Use ## SavedVariables: instead of RegisterForSave()
|