RSS

Понедельник, 29.04.2024, 09:02
Главная » WoW API » API Виджеты » Фрейм »

left, bottom, width, height = StatusBar:GetBoundsRect()

[ править ]
Returns the position and dimension of the smallest area enclosing the frame and its children.
[клоны]
Returns the position and dimension of the smallest area enclosing the frame and its children. This information may not match that returned by :GetRect() if the frame contains textures, font strings, or child frames whose boundaries lie outside its own.


Signature:
Code
left, bottom, width, height = Frame:GetBoundsRect()

Returns:
  • left - Distance from the left edge of the screen to the left edge of the area (in pixels) (number)
  • bottom - Distance from the bottom edge of the screen to the bottom of the area (in pixels) (number)
  • width - Width of the area (in pixels) (number)
  • height - Height of the area (in pixels) (number)

Examples:
CreateFrame("Frame","TestFrame1", UIParent)
TestFrame1:SetWidth(100)
TestFrame1:SetHeight(100)
TestFrame1:SetPoint("BOTTOMLEFT",0,0)
CreateFrame("Frame","TestFrame2", TestFrame1)
TestFrame2:SetWidth(100)
TestFrame2:SetHeight(100)
TestFrame2:SetPoint("CENTER",TestFrame1,"TOPRIGHT",0,0)

TestFrame1:GetBoundsRect()
-- prints "0, 0, 150, 150"

Также смотрите: Фрейм
Ссылки: http://wowprogramming.com/docs/widgets/Frame/GetBoundsRect