LuaGui

The root of the GUI. This type houses the root elements, top, left, center, goal, and screen, to which other elements can be added to be displayed on screen.

Note: Every player can have a different GUI state.
class LuaGui - sort
is_valid_sprite_path(sprite_path) → boolean Returns true if sprite_path is valid and contains loaded sprite, otherwise false.
player :: LuaPlayer [R] The player who owns this gui.
children :: dictionary stringLuaGuiElement [R] The children GUI elements mapped by name <> element.
top :: LuaGuiElement [R] The top part of the GUI.
left :: LuaGuiElement [R] The left part of the GUI.
center :: LuaGuiElement [R] The center part of the GUI.
goal :: LuaGuiElement [R] The flow used in the objectives window.
screen :: LuaGuiElement [R] For showing a GUI somewhere on the entire screen.
valid :: boolean [R] Is this object valid?
help() → string All methods, and properties that this object supports.
is_valid_sprite_path(sprite_path) → boolean

Returns true if sprite_path is valid and contains loaded sprite, otherwise false. Sprite path of type file doesn't validate if file exists.

Parameters
sprite_path :: SpritePath: Path to a image.
player :: LuaPlayer [Read-only]

The player who owns this gui.

children :: dictionary stringLuaGuiElement [Read-only]

The children GUI elements mapped by name <> element.

top :: LuaGuiElement [Read-only]

The top part of the GUI. It is a flow element inside a scroll pane element.

left :: LuaGuiElement [Read-only]

The left part of the GUI. It is a flow element inside a scroll pane element.

center :: LuaGuiElement [Read-only]

The center part of the GUI. It is a flow element.

goal :: LuaGuiElement [Read-only]

The flow used in the objectives window. It is a flow element. The objectives window is only visible when the flow is not empty or the objective text is set.

screen :: LuaGuiElement [Read-only]

For showing a GUI somewhere on the entire screen. It is an empty-widget element.