Home

BaseStyleSpecification

The abstract base of all StyleSpecifications.

Type

struct

Properties

parent

Name of a StyleSpecification. This style inherits all property values from its parent.

Styles without a parent property default to the root style for their type. The exception to this are the root styles themselves, as they cannot have a parent set. Due to this, for root styles, some style properties are mandatory and behavior may be unexpected, such as an element not showing up because its size defaults to 0.

horizontal_align

vertical_align

ignored_by_search

never_hide_by_search

horizontally_stretchable

vertically_stretchable

horizontally_squashable

vertically_squashable

natural_size

If this is a tuple, the first member sets natural_width and the second sets natural_height. Otherwise, both natural_width and natural_height are set to the same value.

size

If this is a tuple, the first member sets width, and the second sets height. Otherwise, both width and height are set to the same value.

width

Sets minimal_width, maximal_width and natural_width to the same value.

minimal_width

Minimal width ensures that the widget will never be smaller than than that size. It can't be squashed to be smaller.

maximal_width

Maximal width ensures that the widget will never be bigger than than that size. It can't be stretched to be bigger.

natural_width

Natural width specifies the width of the element tries to have, but it can still be squashed/stretched to have a different size.

height

Sets minimal_height, maximal_height and natural_height to the same value.

minimal_height

Minimal height ensures that the widget will never be smaller than than that size. It can't be squashed to be smaller.

maximal_height

Maximal height ensures that the widget will never be bigger than than that size. It can't be stretched to be bigger.

natural_height

Natural height specifies the height of the element tries to have, but it can still be squashed/stretched to have a different size.

padding

Sets top_padding, right_padding, bottom_padding and left_padding to the same value.

top_padding

right_padding

bottom_padding

left_padding

margin

Sets top_margin, right_margin, bottom_margin and left_margin to the same value.

top_margin

right_margin

bottom_margin

left_margin

effect

Name of a custom GUI effect, which are hard-coded in the game's engine. Only has one option currently.

effect_opacity

tooltip