Difference between revisions of "Sprite:getLayoutInfo"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2018.9<br/>
'''<translate>Available since</translate>:''' Gideros 2018.9<br/>
+
'''Class:''' [[Sprite]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate><br />
 
<br />
 
 
Returns computed placement value according to Gideros layout system.
 
Returns computed placement value according to Gideros layout system.
 +
<syntaxhighlight lang="lua">
 +
(table) = Sprite:getLayoutInfo()
 +
</syntaxhighlight>
 +
 
The returned table can contain the following fields:
 
The returned table can contain the following fields:
* '''startx''': The 0-based index of the column the child was placed into<br/>
+
* '''startx''': the 0-based index of the column the child was placed into
* '''starty''': The 0-based index of the row the child was placed into<br/>
+
* '''starty''': the 0-based index of the row the child was placed into
* '''width''': The width of the child<br/>
+
* '''width''': the width of the child
* '''height''': The height of the child<br/>
+
* '''height''': the height of the child
* '''weightx''': The horizontal weight of the child<br/>
+
* '''weightx''': the horizontal weight of the child
* '''weighty''': The vertical weight of the child<br/>
+
* '''weighty''': the vertical weight of the child
* '''minWidth''' (table): Minimum width<br/>
+
* '''minWidth''' (table): minimum width
* '''minHeight''' (table): Minimum height<br/></translate>
+
* '''minHeight''' (table): minimum height
<source lang="lua">
 
(table) = Sprite:getLayoutInfo()
 
</source>
 
  
=== <translate>Return values</translate> ===
+
=== Return values ===
'''<translate>Returns</translate>''' (table) <translate>Table of layout information.</translate><br/>
+
'''Returns''' (table) table of layout information<br/>
  
 
{{Sprite}}
 
{{Sprite}}

Latest revision as of 14:33, 13 July 2023

Available since: Gideros 2018.9
Class: Sprite

Description

Returns computed placement value according to Gideros layout system.

(table) = Sprite:getLayoutInfo()

The returned table can contain the following fields:

  • startx: the 0-based index of the column the child was placed into
  • starty: the 0-based index of the row the child was placed into
  • width: the width of the child
  • height: the height of the child
  • weightx: the horizontal weight of the child
  • weighty: the vertical weight of the child
  • minWidth (table): minimum width
  • minHeight (table): minimum height

Return values

Returns (table) table of layout information