The Battle for Wesnoth  1.19.0-dev
GUIToolkitWML

State

A state contains the info what to do in a state. At the moment this is rather focussed on the drawing part, might change later. Keys:

Key Type Default Description
draw section mandatory Section with drawing directions for a canvas.

Window Definition

A window defines how a window looks in the game.

Key Type Default Description
id string mandatory Unique id for this window.
description t_string mandatory Unique translatable name for this window.
resolution section mandatory The definitions of the window in various resolutions.

Cell

Every grid cell has some cell configuration values and one widget in the grid cell. Here we describe the what is available more information about the usage can be found at GUILayout.

Key Type Default Description
id string "" A grid is a widget and can have an id. This isn't used that often, but is allowed.
linked_group string 0 .

Row Values

For every row the following variables are available:

Key Type Default Description
grow_factor unsigned 0 The grow factor for a row.

Cell Values

For every column the following variables are available:

Key Type Default Description
grow_factor unsigned 0 The grow factor for a column, this value is only read for the first row.
border_size unsigned 0 The border size for this grid cell.
border border "" Where to place the border in this grid cell.
vertical_alignment v_align "" The vertical alignment of the widget in the grid cell. (This value is ignored if vertical_grow is true.)
horizontal_alignment h_align "" The horizontal alignment of the widget in the grid cell.(This value is ignored if horizontal_grow is true.)
vertical_grow bool false Does the widget grow in vertical direction when the grid cell grows in the vertical direction. This is used if the grid cell is wider as the best width for the widget.
horizontal_grow bool false Does the widget grow in horizontal direction when the grid cell grows in the horizontal direction. This is used if the grid cell is higher as the best width for the widget.