Links |
---|
![]() |
This function becomes protected when affecting frames or regions that are protected.
|
Returns the distance from the bottom-left corner of the screen to the center of a Region, using the region's own coordinate space (ie, dependent on effective scale).
x,y = GetCenter()
Returns
The following returns only apply if the region has a defined position and size (nil otherwise).
- x
- Number - Distance between the region's center and the left edge of the screen (negative values are further left of the screen edge)
- y
- Number - Distance between the region's center and bottom edge of the screen (negative values are below the screen edge)
Patch changes
Patch 8.2.0 (2019-06-25): Not permitted on restricted frames.[1]
Patch 1.11.0 (2006-06-19): Consolidated to
Region:GetCenter()
[2]Patch 1.10.0 (2006-03-28): Added as
Frame:GetCenter()
,Texture:GetCenter()
andFontString:GetCenter()
[3]
See also
- Region:GetLeft() - Distance from the edge of the screen to only the left edge of the region
- Region:GetBottom() - Distance from the edge of the screen to only the bottom edge of the region
- Region:GetEffectiveScale() - The product of a region's scale with that of all its parents
References
- ^
Kaivax 2019-06-19. UI Changes in Rise of Azshara.
- ^
slouken 2006-05-12. Re: Upcoming 1.11 Changes - Concise List. Archived from the original
- ^
slouken 2005-01-27. Re: Upcoming 1.10 Changes - Concise List. Archived from the original