Skip to content

Search

Documentação

widget_layout

The rows a container reads: how it lays out what is in it. The widget_layout component of the Balaur game engine: its 9 properties, and the functions a…

Nesta página

ui · 9 properties · UI

The rows a container reads: how it lays out what is in it.

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

Properties

property type default description
align_content enum stretch How a container that wraps spreads its lines across its direction, and a grid its rows, where they leave room: stretch shares the room among them One of start, center, end, stretch, between, around, evenly.
align_items enum stretch Where a container puts its children across its own direction, and a grid each child in its cell down: stretch makes each as wide (or tall) as the container, baseline lines up their first lines of text, the others keep each child's own size One of start, center, end, stretch, baseline.
direction enum left_to_right Which way a row and a grid's columns run: right_to_left starts them at the right edge One of left_to_right, right_to_left.
gap vec2 [-1,-1] Space between a container's children, across and down, in design pixels: a row puts the first between its children and the second between the lines it wraps onto, a column the second between its children, and a grid the first between its columns and the second between its rows. Below zero on an axis takes the theme's own, which is 8 where it says nothing, and a stated zero puts them edge to edge
justify enum start How a container spreads its children along its own direction once they have their sizes, and a grid its columns: stretch grows a grid's auto columns into the room, and in a row or a column is start One of start, center, end, stretch, between, around, evenly.
min_lines int 1 How many lines a wrapping container divides its children between at least: balance evens them over this many, and any wrap shares a known cross size among them At least 1.
reverse bool false Lay a row, column or flow's children out from its far end
splitter_width float 0 How wide a grab the seams between this container's children get, in design pixels; 0 leaves them fixed. A drag writes the new size onto the neighbour that states one At least 0.
wrap_children enum auto Whether a container's children run onto more lines when they do not fit: auto wraps a flow and keeps every other container on one line; balance evens the lines out over at least min_lines; a _reverse word stacks the lines the other way One of auto, none, wrap, wrap_reverse, balance, balance_reverse.

Tens a certeza?