Thread Tools Display Modes
01-13-09, 09:32 AM   #1
JackOnTheMap
A Murloc Raider
Join Date: Feb 2007
Posts: 8
Tooltip anchor position

I've gotten my tooltip to anchor to the mouse with this:

hooksecurefunc("GameTooltip_SetDefaultAnchor", function(self)
self:SetOwner(UIParent, "ANCHOR_CURSOR")

However, I don't want it right on the mouse but a bit to the left and up from the actual cursor.

Can I get a bit of help with the next line(s) that I need below the bit I have?
  Reply With Quote
01-13-09, 10:14 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
The client does not have built in support for this, you need to hack around it - which is why I refuse to add that feature into my own tooltip addon. You'd need to use an OnUpdate script to call GetCursorPosition, calculate the offsets from there, and then manually place the tooltip at that point. Some people have an extra check in there that only moves the tooltip if your cursor has changed from where it was before.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Tooltip anchor position


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off