Sprite:setLayoutParameters

From GiderosMobile
Revision as of 17:42, 31 August 2018 by Hgy29 (talk | contribs) (Created page with "__NOTOC__ '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Class</translate>:''' Sprite<br/> === <translate>Descri...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2018.9
Class: Sprite

Description



Gideros Layout arranges a sprite's children into cells of a grid. With this method, you tell the parent's sprite how the rows and columns of the layout grid should be sized. If there is extra space available after applygin minimum widths and heights, it is distributed according to relative weights of each row/column.

The following parameters apply:

  • columnWidths: an array of minimum width for each column
  • rowHeights: an array of minimum height for each row
  • columnWeights: an array of relative weights for each column
  • rowWeights: an array of relative weights for each row
  • insetTop: the top margin
  • insetLeft: the left margin
  • insetBottom: the bottom margin
  • insetRight: the right margin
 Sprite:setLayoutParameters(layout)

Parameters

layout: (table) Table of layout parameters.