Skip to content

Search

Dokumentation

widget_grid

The rows a grid reads: its tracks and its named areas. The widget_grid component of the Balaur game engine: its 6 properties, and the functions a script…

På den här sidan

ui · 6 properties · UI

The rows a grid reads: its tracks and its named areas.

In a scene, widget_grid is the node key that applies it. A script reaches each property below as a field on node.widget_grid: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.widget_grid.get() and node.widget_grid.set(table).

Properties

property type default description
areas list [] A grid's named areas, one string a row of space-separated names with . for a cell in none: ["head head", "side main"]. A child names one in row and column
auto_columns string — The size of each column a grid adds past grid_columns, for a child placed beyond them or flowing down under auto_flow = "column", in the words grid_columns takes without repeat; several take turns. Empty is auto
auto_flow enum row The order a grid fills cells with the children that name none: along each row, or down each column; a _dense order goes back to fill a hole a bigger child left One of row, column, row_dense, column_dense.
auto_rows string — The size of each row a grid adds past grid_rows, in the words auto_columns takes; empty is auto
grid_columns string — A grid's columns, left to right and space-separated: design pixels (120), a share of what is left (1fr), a percentage (25%), auto, min_content, max_content, fit_content(120), minmax(80, 1fr), and repeat(3, 1fr), whose count may be auto_fill or auto_fit. Empty is two equal columns
grid_rows string — A grid's rows, top to bottom, in the words grid_columns takes; empty makes each row as tall as what is in it

Är du säker?