Yes, that helped. Thanks! I made it switch sides automatically, but it does not take the offset values. Still gotta figure out what is causing this.
[EDIT] Nope, can't get the offsets working since I have no idea what the return value of wgsp is so I could "if" for it. But the autoswitching sides is working with the following change starting from line 57:
Code: Select all
--local anchor = { Point = "topright", RelativeTo = "MiracleGrowLight", RelativePoint = "topleft", XOffset = 10, YOffset = 0 }
local wgsp = WindowGetScreenPosition;
WindowGetScreenPosition = function(windowName)
if DoesWindowExist(windowName) then
return wgsp(windowName)
else
d("Failed to get screen position of "..windowName)
return 0,0,0,0
end
end
Tooltips.AnchorTooltip( anchor )