Module game.gui
Transport Fever GUI scripting interface functions.
Functions
setEnabled (id, enabled) | Enables or disables a component. |
setVisible (id, visible) | Shows or hides a component. |
setHighlighted (id, highlighted) | Sets the highlighted state of a component. |
setCamera (data) | Sets camera to follow an entity or to a given position/orientation. |
stopAction () | Stops the currently active action (if any). |
playTrack (track, offset) | Plays a specific track. |
Functions
- setEnabled (id, enabled)
-
Enables or disables a component.
Parameters:
- id string component ID
- enabled bool whether enabled or not
- setVisible (id, visible)
-
Shows or hides a component.
Parameters:
- id string component ID
- visible bool whether visible or not
- setHighlighted (id, highlighted)
-
Sets the highlighted state of a component.
Parameters:
- id string component ID
- highlighted bool whether highlighted or not
- setCamera (data)
-
Sets camera to follow an entity or to a given position/orientation.
Parameters:
- data int or vec5 entity ID or camera properties (posX, posY, distance (0-4000), angle (0-2*PI), pitch (0-1))
- stopAction ()
- Stops the currently active action (if any).
- playTrack (track, offset)
-
Plays a specific track.
Parameters:
- track string file name
- offset float