Sprite:getLayoutConstraints: Difference between revisions

From GiderosMobile
Created page with "__NOTOC__ '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Class</translate>:''' Sprite<br/> === <translate>Descri..."
 
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
'''<translate>Available since</translate>:''' Gideros 2018.9<br/>
'''Available since:''' Gideros 2018.9<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
'''Class:''' [[Sprite]]<br/>
=== <translate>Description</translate> ===
 
<translate><br />
=== Description ===
<br />See ''Sprite.setLayoutConstraints'' for a description of the fields.<br /></translate>
See '''[[Sprite:setLayoutConstraints]]''' for a description of the fields.
<source lang="lua">
<syntaxhighlight lang="lua">
(table) = Sprite:getLayoutConstraints()
(table) = Sprite:getLayoutConstraints([mask,layoutKey])
</source>
</syntaxhighlight>
=== <translate>Return values</translate> ===
 
'''<translate>Returns</translate>''' (table) <translate>Table of layout constraints.</translate><br/>
=== Parameters ===
'''mask''' (bool) enable masking '''optional'''<br/>
'''layoutKey''' (LayoutKeys) the LayoutKeys to querry '''optional'''<br/>
 
=== Return values ===
'''Returns''' (table) table of layout constraints<br/>
 
=== Example ===
<syntaxhighlight lang="lua">
local lp2 = mybtn1:getLayoutConstraints(true, Sprite.LayoutKeys.gridwidth)
print(lp2.gridwidth)
</syntaxhighlight>
 
{{Sprite}}

Latest revision as of 14:10, 20 October 2025

Available since: Gideros 2018.9
Class: Sprite

Description

See Sprite:setLayoutConstraints for a description of the fields.

(table) = Sprite:getLayoutConstraints([mask,layoutKey])

Parameters

mask (bool) enable masking optional
layoutKey (LayoutKeys) the LayoutKeys to querry optional

Return values

Returns (table) table of layout constraints

Example

local lp2 = mybtn1:getLayoutConstraints(true, Sprite.LayoutKeys.gridwidth)
print(lp2.gridwidth)