By nesting elements within layouts/groupings, you are able to easily group elements together in-game. It allows for adjusting/moving them together, uniform padding and additional visual flair possibilities.
Each layout element has its own attributes specific to its type. Additionally, elements within a layout are subject to common common layout element attributes.
Specifies the padding for this panel. Please note that if padding is specified, the panel will function as a LayoutGroup (which it does not do by default).
float(left) float(right) float(top) float(bottom)
(none)
<Panel><Text>Text contained within Panel</Text></Panel>
A layout element based on HTML tables, allowing you to specify the position of elements in specific rows/columns.
Attribute Name
Description
Type / Options
Default Value
padding
float(left) float(right) float(top) float(bottom)
0 0 0 0
cellSpacing
Spacing between each cell.
float
0
columnWidths
(Optional) Explicitly set the width of each column. Use a value of 0 to auto-size a specific column.
float list - e.g. '32 0 0 32'
(none)
automaticallyAddColumns
If more cells are added to a row than are accounted for by columnWidths, should this TableLayout automatically add one or more new auto-sized entries (0) to columnWidths?
true
automaticallyRemoveEmptyColumns
If there are more entries in columnWidths than there are cells in any row, should this TableLayout automatically remove entries from columnWidths until their are no 'empty' columns?
true
autoCalculateHeight
If set to true, then the height of this TableLayout will automatically be calculated as the sum of each rows preferredHeight value. This option cannot be used without explicitly sized rows.
false
useGlobalCellPadding
If set to true, then all cells will use this TableLayout's cellPadding value.
Sets the height for this row. Use a value of '0' to specify that this row should be auto-sized.
float
0
dontUseTableRowBackground
If set to true, then this row will ignore the tables' rowBackgroundImage and rowBackgroundColor values, allowing you to override those values for this row.