WoW:API GameTooltip SetOwner: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->


GameTooltip:SetOwner(owner, anchor);
GameTooltip:SetOwner(owner, anchor&#91;, +x, +y&#93;);


<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
Line 15: Line 15:
<!-- List each argument, together with its type -->
<!-- List each argument, together with its type -->


:(owner, "Anchor")
:(owner, "Anchor"&#91;, +x, +y&#93;)
:;owner : Frame - Owner frame, which defines the element where the tooltip is centered on
:;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 : String - a string that describes the anchor point as it would be set via the SetPoint() function.  Anchoring meathods as follows:
Line 25: Line 25:
::ANCHOR_BOTTOMLEFT      -------    SetPoint("TOPRIGHT",object,"BOTTOMLEFT")
::ANCHOR_BOTTOMLEFT      -------    SetPoint("TOPRIGHT",object,"BOTTOMLEFT")
::ANCHOR_CURSOR
::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.


----
----
Line 37: Line 39:
<!-- Details not appropriate for the main description can go here -->
<!-- Details not appropriate for the main description can go here -->


: This only appears to be a convience method for setting the location of the tooltip, it doesn't seem to actually grant any "ownership" of the tooltip over anything else.
: This will set the owner for tooltip:IsOwned(frame). For instance, first call GameTooltip:SetOwner(UIParent). Then GameTooltip:IsOwned(UIParent) will return 1.


----
----

Revision as of 21:19, 13 October 2005

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