WoW:API Region GetRight: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (Move page script moved page API Region GetRight to API Region GetRight without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
This function returns the right edge of the frame in relation to the left of the screen, scaled with the frame's effective scale.  As a frame moves to the right its return value for this function increases, as it moves to the left its return value decreases.  This function works for all frames including UIParent and WorldFrame.
#REDIRECT [[API Region GetBottom]] {{widgetmethod}}
 
This function is only guaranteed to work after the PLAYER_LOGIN event and then, only if the frame in question is being Shown.  Also, currently if you re-anchor a frame or Show a frame, you will need to wait up to a second before this function will return the correct new value.
 
Note: The values returned by this function are generally not nice whole numbers but are often close.
Example: 767.99994277954
 
----
;''Arguments''
 
:''none''
 
----
;''Returns''
 
:;number
 
Note: nil is returned if the frame has no anchor points (ie. frame was never positioned or :ClearAllPoints() has been called on the frame)
 
----
;''Example''
local playerFrameRight = PlayerFrame:GetRight();
----
 
==See also==
 
*[[API_LayoutFrame_GetTop|LayoutFrame:GetTop()]]
*[[API_LayoutFrame_GetLeft|LayoutFrame:GetLeft()]]
*[[API_LayoutFrame_GetBottom|LayoutFrame:GetBottom()]]
 
*[[Widget_Anchors|Widget Anchors]]
 
 
----
{{WoW API}}

Latest revision as of 04:47, 15 August 2023