WoW:API GameTooltip SetOwner: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 43: Line 43:
----
----
{{Template:WoW API}}
{{Template:WoW API}}
<!-- Update the category to the appropriate subsection, and be sure to put the function name as the label for the category link. Multiple subcategories are okay if appropriate, please dont link functions to the API Functions category directly. -->
[[Category:API Functions|Empty Template]]

Revision as of 15:43, 4 January 2006

GameTooltip:SetOwner -Documentation by Xenoveritas-
-Edited by ThePooBurner-


GameTooltip:SetOwner(owner, anchor[, +x, +y]);


Moves the game tooltip to a location based on the "owner" frame.


Arguments


(owner, "Anchor"[, +x, +y])
owner
Frame - Owner frame, which defines the element where the tooltip is centered on
anchor
String - a string that describes the anchor point as it would be set via the SetPoint() function. Anchoring meathods as follows:
ANCHOR_TOPRIGHT ------- SetPoint("BOTTOMRIGHT",object,"TOPRIGHT")
ANCHOR_RIGHT ------- SetPoint("BOTTOMLEFT",object,"TOPRIGHT")
ANCHOR_BOTTOMRIGHT ------- SetPoint("TOPLEFT",object,"BOTTOMRIGHT")
ANCHOR_TOPLEFT ------- SetPoint("BOTTOMLEFT",object,"TOPLEFT")
ANCHOR_LEFT ------- SetPoint("BOTTOMRIGHT",object,"TOPLEFT")
ANCHOR_BOTTOMLEFT ------- SetPoint("TOPRIGHT",object,"BOTTOMLEFT")
ANCHOR_CURSOR

You can also move the tooltip by x or y, where positive x is to the right and positive y is up. Thus, negative x is to the left and negative y is down. Doesn't work if anchor is ANCHOR_CURSOR.


Returns
Nothing?

Details


This will set the owner for tooltip:IsOwned(frame). For instance, first call GameTooltip:SetOwner(UIParent). Then GameTooltip:IsOwned(UIParent) will return 1.

Template:WoW API