The Battle for Wesnoth  1.15.11+dev
GUIToolkitWML

Table of Contents

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 mandatorySection with drawing directions for a canvas.

Window Definition

A window defines how a window looks in the game.

Key Type Default Description
id string mandatoryUnique id for this window.
description t_stringmandatoryUnique translatable name for this window.
resolution section mandatoryThe 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_alignmenth_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.