Sprite:getLayoutParameters

From GiderosMobile
Revision as of 14:56, 20 October 2025 by MoKaLux (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2018.9
Class: Sprite

Description

See Sprite:setLayoutParameters for a description of the fields.

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

Parameters

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

Return values

Returns (table) table of layout parameters

Example

-- Return a table containing only the computed cellSpacingY of the layout, instead of returning everything
local lp = sprite:getLayoutParameters(true, Sprite.LayoutKeys.cellSpacingY)
print(lp.cellSpacingY[1], lp.cellSpacingY[2], lp.cellSpacingY[3]) -- three columns grid