m
Move page script moved page API GameTooltip SetOwner to WoW:API GameTooltip SetOwner without leaving a redirect
mNo edit summary |
m (Move page script moved page API GameTooltip SetOwner to WoW:API GameTooltip SetOwner without leaving a redirect) |
||
| (10 intermediate revisions by 9 users not shown) | |||
| Line 1: | Line 1: | ||
{{widgetmethod}} | |||
Moves the game tooltip to a location based on the "owner" frame. | Moves the game tooltip to a location based on the "owner" frame. | ||
GameTooltip:SetOwner(owner, "anchor"[, +x, +y]); | |||
---- | ---- | ||
;''Arguments'' | ;''Arguments'' | ||
:(owner, "Anchor"[, +x, +y]) | |||
:;owner : Frame - Owner frame, which defines the element where the tooltip is centered on. A pointer to the frame is required, not the frame name itself (use _G['MyFrame'] to get the pointer from the frame name). | |||
:(owner, "Anchor") | :;anchor : String - a string that describes the anchor point as it would be set via the SetPoint() function. Anchoring methods as follows: | ||
:;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 | |||
::ANCHOR_TOPRIGHT ------- SetPoint("BOTTOMRIGHT",object,"TOPRIGHT") | ::ANCHOR_TOPRIGHT ------- SetPoint("BOTTOMRIGHT",object,"TOPRIGHT") | ||
::ANCHOR_RIGHT ------- SetPoint("BOTTOMLEFT",object,"TOPRIGHT") | ::ANCHOR_RIGHT ------- SetPoint("BOTTOMLEFT",object,"TOPRIGHT") | ||
| Line 24: | Line 15: | ||
::ANCHOR_LEFT ------- SetPoint("BOTTOMRIGHT",object,"TOPLEFT") | ::ANCHOR_LEFT ------- SetPoint("BOTTOMRIGHT",object,"TOPLEFT") | ||
::ANCHOR_BOTTOMLEFT ------- SetPoint("TOPRIGHT",object,"BOTTOMLEFT") | ::ANCHOR_BOTTOMLEFT ------- SetPoint("TOPRIGHT",object,"BOTTOMLEFT") | ||
::ANCHOR_CURSOR | |||
::ANCHOR_PRESERVE | |||
::ANCHOR_NONE | |||
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'' | ;''Returns'' | ||
: Nothing. | |||
: Nothing | |||
---- | ---- | ||
;''Details'' | ;''Details'' | ||
: This will set the owner for tooltip:IsOwned(frame). For instance, first call GameTooltip:SetOwner(UIParent). Then GameTooltip:IsOwned(UIParent) will return 1. | |||
: This | |||