Factorio Runtime DocsVersion 1.1.100

Class LuaStyle

Style of a GUI element. All of the attributes listed here may be nil if not available for a particular GUI element.

Members

help()  → string

All methods and properties that this object supports.

All methods and properties that this object supports.

gui [R] :: LuaGui

Gui of the LuaGuiElement of this style.

Gui of the LuaGuiElement of this style.

name [R] :: string

Name of this style.

Name of this style.

minimal_width [RW] :: int

Minimal width ensures, that the widget will never be smaller than than that size.

Minimal width ensures, that the widget will never be smaller than than that size.

maximal_width [RW] :: int

Maximal width ensures, that the widget will never be bigger than than that size.

Maximal width ensures, that the widget will never be bigger than than that size.

minimal_height [RW] :: int

Minimal height ensures, that the widget will never be smaller than than that size.

Minimal height ensures, that the widget will never be smaller than than that size.

maximal_height [RW] :: int

Maximal height ensures, that the widget will never be bigger than than that size.

Maximal height ensures, that the widget will never be bigger than than that size.

natural_width [RW] :: int

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

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

natural_height [RW] :: int

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

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

top_padding [RW] :: int
right_padding [RW] :: int
bottom_padding [RW] :: int
left_padding [RW] :: int
top_margin [RW] :: int
right_margin [RW] :: int
bottom_margin [RW] :: int
left_margin [RW] :: int
horizontal_align [RW] :: string?

Horizontal align of the inner content of the widget, if any.

Horizontal align of the inner content of the widget, if any.

vertical_align [RW] :: string?

Vertical align of the inner content of the widget, if any.

Vertical align of the inner content of the widget, if any.

font_color [RW] :: Color
font [RW] :: string
top_cell_padding [RW] :: int

Space between the table cell contents top and border.

Space between the table cell contents top and border.

right_cell_padding [RW] :: int

Space between the table cell contents right and border.

Space between the table cell contents right and border.

bottom_cell_padding [RW] :: int

Space between the table cell contents bottom and border.

Space between the table cell contents bottom and border.

left_cell_padding [RW] :: int

Space between the table cell contents left and border.

Space between the table cell contents left and border.

horizontally_stretchable [RW] :: boolean?

Whether the GUI element stretches its size horizontally to other elements.

Whether the GUI element stretches its size horizontally to other elements.

vertically_stretchable [RW] :: boolean?

Whether the GUI element stretches its size vertically to other elements.

Whether the GUI element stretches its size vertically to other elements.

horizontally_squashable [RW] :: boolean?

Whether the GUI element can be squashed (by maximal width of some parent element) horizontally.

Whether the GUI element can be squashed (by maximal width of some parent element) horizontally.

vertically_squashable [RW] :: boolean?

Whether the GUI element can be squashed (by maximal height of some parent element) vertically.

Whether the GUI element can be squashed (by maximal height of some parent element) vertically.

rich_text_setting [RW] :: defines.rich_text_setting

How this GUI element handles rich text.

How this GUI element handles rich text.

hovered_font_color [RW] :: Color
clicked_font_color [RW] :: Color
disabled_font_color [RW] :: Color
pie_progress_color [RW] :: Color
clicked_vertical_offset [RW] :: int
selected_font_color [RW] :: Color
selected_hovered_font_color [RW] :: Color
selected_clicked_font_color [RW] :: Color
strikethrough_color [RW] :: Color
draw_grayscale_picture [RW] :: boolean
horizontal_spacing [RW] :: int

Horizontal space between individual cells.

Horizontal space between individual cells.

vertical_spacing [RW] :: int

Vertical space between individual cells.

Vertical space between individual cells.

use_header_filler [RW] :: boolean
bar_width [RW] :: uint
color [RW] :: Color
column_alignments [R] :: LuaCustomTable[uint → Alignment]

Array containing the alignment for every column of this table element.

Array containing the alignment for every column of this table element.

single_line [RW] :: boolean
extra_top_padding_when_activated [RW] :: int
extra_bottom_padding_when_activated [RW] :: int
extra_left_padding_when_activated [RW] :: int
extra_right_padding_when_activated [RW] :: int
extra_top_margin_when_activated [RW] :: int
extra_bottom_margin_when_activated [RW] :: int
extra_left_margin_when_activated [RW] :: int
extra_right_margin_when_activated [RW] :: int
stretch_image_to_widget_size [RW] :: boolean
badge_font [RW] :: string
badge_horizontal_spacing [RW] :: int
default_badge_font_color [RW] :: Color
selected_badge_font_color [RW] :: Color
disabled_badge_font_color [RW] :: Color
width [W] :: int

Sets both minimal and maximal width to the given value.

Sets both minimal and maximal width to the given value.

height [W] :: int

Sets both minimal and maximal height to the given value.

Sets both minimal and maximal height to the given value.

size [W] :: int or array[int]

Sets both width and height to the given value.

Sets both width and height to the given value.

padding [W] :: int or array[int]

Sets top/right/bottom/left paddings to this value.

Sets top/right/bottom/left paddings to this value.

margin [W] :: int or array[int]

Sets top/right/bottom/left margins to this value.

Sets top/right/bottom/left margins to this value.

cell_padding [W] :: int

Space between the table cell contents and border.

Space between the table cell contents and border.

extra_padding_when_activated [W] :: int or array[int]

Sets extra_top/right/bottom/left_padding_when_activated to this value.

Sets extra_top/right/bottom/left_padding_when_activated to this value.

extra_margin_when_activated [W] :: int or array[int]

Sets extra_top/right/bottom/left_margin_when_activated to this value.

Sets extra_top/right/bottom/left_margin_when_activated to this value.

valid [R] :: boolean

Is this object valid?

Is this object valid?

object_name [R] :: string

The class name of this object.

The class name of this object.

Methods

help()  → string

All methods and properties that this object supports.

Attributes

gui :: LuaGuiRead

Gui of the LuaGuiElement of this style.


name :: stringRead

Name of this style.


minimal_width :: intRead/Write

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


maximal_width :: intRead/Write

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


minimal_height :: intRead/Write

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


maximal_height :: intRead/Write

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


natural_width :: intRead/Write

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


natural_height :: intRead/Write

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


top_padding :: intRead/Write


right_padding :: intRead/Write


bottom_padding :: intRead/Write


left_padding :: intRead/Write


top_margin :: intRead/Write


right_margin :: intRead/Write


bottom_margin :: intRead/Write


left_margin :: intRead/Write


horizontal_align :: string?Read/Write

Horizontal align of the inner content of the widget, if any. Possible values are "left", "center" or "right".


vertical_align :: string?Read/Write

Vertical align of the inner content of the widget, if any. Possible values are "top", "center" or "bottom".


font_color :: ColorRead/Write


font :: stringRead/Write


top_cell_padding :: intRead/Write

Space between the table cell contents top and border.

Can only be used if this is LuaTableStyle

right_cell_padding :: intRead/Write

Space between the table cell contents right and border.

Can only be used if this is LuaTableStyle

bottom_cell_padding :: intRead/Write

Space between the table cell contents bottom and border.

Can only be used if this is LuaTableStyle

left_cell_padding :: intRead/Write

Space between the table cell contents left and border.

Can only be used if this is LuaTableStyle

horizontally_stretchable :: boolean?Read/Write

Whether the GUI element stretches its size horizontally to other elements. nil if this element does not support stretching.


vertically_stretchable :: boolean?Read/Write

Whether the GUI element stretches its size vertically to other elements. nil if this element does not support stretching.


horizontally_squashable :: boolean?Read/Write

Whether the GUI element can be squashed (by maximal width of some parent element) horizontally. nil if this element does not support squashing. This is mainly meant to be used for scroll-pane The default value is false.


vertically_squashable :: boolean?Read/Write

Whether the GUI element can be squashed (by maximal height of some parent element) vertically. nil if this element does not support squashing. This is mainly meant to be used for scroll-pane The default (parent) value for scroll pane is true, false otherwise.


rich_text_setting :: defines.rich_text_settingRead/Write

How this GUI element handles rich text.

Can only be used if this is LuaLabelStyle or LuaTextBoxStyle or LuaTextFieldStyle

hovered_font_color :: ColorRead/Write

Can only be used if this is LuaButtonStyle

clicked_font_color :: ColorRead/Write

Can only be used if this is LuaButtonStyle

disabled_font_color :: ColorRead/Write

Can only be used if this is LuaButtonStyle or LuaTabStyle

pie_progress_color :: ColorRead/Write

Can only be used if this is LuaButtonStyle

clicked_vertical_offset :: intRead/Write

Can only be used if this is LuaButtonStyle

selected_font_color :: ColorRead/Write

Can only be used if this is LuaButtonStyle

selected_hovered_font_color :: ColorRead/Write

Can only be used if this is LuaButtonStyle

selected_clicked_font_color :: ColorRead/Write

Can only be used if this is LuaButtonStyle

strikethrough_color :: ColorRead/Write

Can only be used if this is LuaButtonStyle

draw_grayscale_picture :: booleanRead/Write

Can only be used if this is LuaButtonStyle

horizontal_spacing :: intRead/Write

Horizontal space between individual cells.

Can only be used if this is LuaTableStyle or LuaFlowStyle or LuaHorizontalFlowStyle

vertical_spacing :: intRead/Write

Vertical space between individual cells.

Can only be used if this is LuaTableStyle or LuaFlowStyle or LuaVerticalFlowStyle or LuaTabbedPaneStyle

use_header_filler :: booleanRead/Write

Can only be used if this is LuaFrameStyle

bar_width :: uintRead/Write

Can only be used if this is LuaProgressBarStyle

color :: ColorRead/Write

Can only be used if this is LuaProgressBarStyle

column_alignments :: LuaCustomTable[uint → Alignment] Read

Array containing the alignment for every column of this table element. Even though this property is marked as read-only, the alignment can be changed by indexing the LuaCustomTable, like so:

Example

table_element.style.column_alignments[1] = "center"

single_line :: booleanRead/Write

Can only be used if this is LabelStyle

extra_top_padding_when_activated :: intRead/Write

Can only be used if this is ScrollPaneStyle

extra_bottom_padding_when_activated :: intRead/Write

Can only be used if this is ScrollPaneStyle

extra_left_padding_when_activated :: intRead/Write

Can only be used if this is ScrollPaneStyle

extra_right_padding_when_activated :: intRead/Write

Can only be used if this is ScrollPaneStyle

extra_top_margin_when_activated :: intRead/Write

Can only be used if this is ScrollPaneStyle

extra_bottom_margin_when_activated :: intRead/Write

Can only be used if this is ScrollPaneStyle

extra_left_margin_when_activated :: intRead/Write

Can only be used if this is ScrollPaneStyle

extra_right_margin_when_activated :: intRead/Write

Can only be used if this is ScrollPaneStyle

stretch_image_to_widget_size :: booleanRead/Write

Can only be used if this is ImageStyle

badge_font :: stringRead/Write

Can only be used if this is TabStyle

badge_horizontal_spacing :: intRead/Write

Can only be used if this is TabStyle

default_badge_font_color :: ColorRead/Write

Can only be used if this is TabStyle

selected_badge_font_color :: ColorRead/Write

Can only be used if this is TabStyle

disabled_badge_font_color :: ColorRead/Write

Can only be used if this is TabStyle

width :: intWrite

Sets both minimal and maximal width to the given value.


height :: intWrite

Sets both minimal and maximal height to the given value.


size :: int or array[int] Write

Sets both width and height to the given value. Also accepts an array with two values, setting width to the first and height to the second one.


padding :: int or array[int] Write

Sets top/right/bottom/left paddings to this value. An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.


margin :: int or array[int] Write

Sets top/right/bottom/left margins to this value. An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.


cell_padding :: intWrite

Space between the table cell contents and border. Sets top/right/bottom/left cell paddings to this value.

Can only be used if this is LuaTableStyle

extra_padding_when_activated :: int or array[int] Write

Sets extra_top/right/bottom/left_padding_when_activated to this value. An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.


extra_margin_when_activated :: int or array[int] Write

Sets extra_top/right/bottom/left_margin_when_activated to this value. An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.


valid :: booleanRead

Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be false. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.


object_name :: stringRead

The class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.

Classes

Events

Concepts

Defines

Builtin types