AbsoluteSize (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy
added it in limitations
>JulienDethurens
No edit summary
 
(23 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{CatUp|Properties}}
<onlyinclude>
{|
{{Property
|<onlyinclude>{{Property|
|name       = AbsoluteSize
name = AbsoluteSize
|type        = Vector2
|property = [[Vector2]] ''AbsoluteSize''
|description = Size of the render window in pixels.
|description = Size in pixels.
|object     = GuiBase
|object = [[RBX.lua.Frame (Object)|Frame]], [[RBX.lua.ImageButton (Object)|ImageButton]], [[RBX.lua.TextBox (Object)|TextBox]], [[RBX.lua.TextButton (Object)|TextButton]], [[RBX.lua.TextLabel (Object)|TextLabel]], [[RBX.lua.BillboardGui (Object)|BillboardGui]], [[RBX.lua.ScreenGui (Object)|ScreenGui]]
}}
|}}</onlyinclude>
</onlyinclude>
|}
 
{{clear floats}}


== Limitations ==
== Limitations ==
Takes 1.3 seconds to initiate on join, and .3 of a second on respawn. Only LocalScripts see the absolute size, normal scripts AbsoluteSize is set to Vector2.new(0, 0).
* Takes 1.3 seconds to initiate on join, and a third of a second after respawning.
* Only LocalScripts see the true absolute size. For normal scripts, the AbsoluteSize is Vector2.new(0, 0).
* The AbsoluteSize property is often greater than it's AbsolutePosition counterpart by less then a decimal, even though their {{type|UDim2}} position and sizes may be the same. For example, if you have a GUI with a position of UDim2.new(0, 10, 0, 10) and a size of UDim2.new(0, 10, 0, 10), the AbsolutePosition will be 7, while the AbsoluteSize will be about 7.8619175. A good way to compare them properly is to perform the math.floor() function on the AbsoluteSize.


[[Category:Properties]]
[[Category:Properties]]

Latest revision as of 02:24, 15 February 2012

AbsoluteSize
Type Vector2
Description Size of the render window in pixels.
Member of GuiBase



Limitations

  • Takes 1.3 seconds to initiate on join, and a third of a second after respawning.
  • Only LocalScripts see the true absolute size. For normal scripts, the AbsoluteSize is Vector2.new(0, 0).
  • The AbsoluteSize property is often greater than it's AbsolutePosition counterpart by less then a decimal, even though their UDim2 position and sizes may be the same. For example, if you have a GUI with a position of UDim2.new(0, 10, 0, 10) and a size of UDim2.new(0, 10, 0, 10), the AbsolutePosition will be 7, while the AbsoluteSize will be about 7.8619175. A good way to compare them properly is to perform the math.floor() function on the AbsoluteSize.