diff options
author | SilverSokolova <80606782+SilverSokolova@users.noreply.github.com> | 2024-10-29 21:38:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-29 21:38:37 -0500 |
commit | 6423dead1f89ef89f11bb018aa471f3bbb199f22 (patch) | |
tree | c740fafb627790c169009135643c9a69200c6836 /doc/lua | |
parent | cc5fbb0087518a2f4ab9e86f5b2cff2d3b0ed3fb (diff) |
Interface docs
Diffstat (limited to 'doc/lua')
-rw-r--r-- | doc/lua/openstarbound.md | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/doc/lua/openstarbound.md b/doc/lua/openstarbound.md index b5ceef0..d520705 100644 --- a/doc/lua/openstarbound.md +++ b/doc/lua/openstarbound.md @@ -115,6 +115,63 @@ Sets a configuration value in `/storage/starbound.config` by path. Returns all recipes. --- +# Interface + +The interface table contains bindings which allow scripts to display a message at the bottom of the screen, among other things. + +#### `void` interface.queueMessage(`String` message, [`float` cooldown, [`float` springState]]) + +Queues a message popup at the bottom of the screen with an optional **cooldown** and **springState**. + +#### `void` interface.setHudVisible(`bool` visible) + +Sets the HUD's visibility. + +#### `bool` interface.hudVisible() + +Returns the HUD's visibility. + +#### `PaneId` interface.bindRegisteredPane(`string` paneName) +Binds a registered pane (defined in `/source/frontend/StarMainInterfaceTypes`) to a Lua value, which can then call functions on that pane. +<details><summary><b>Panes</b></summary> +EscapeDialog<br> +Inventory<br> +Codex<br> +Cockpit<br> +Tech<br> +Songbook<br> +Ai<br> +Popup<br> +Confirmation<br> +JoinRequest<br> +Options<br> +QuestLog<br> +ActionBar<br> +TeamBar<br> +StatusPane<br> +Chat<br> +WireInterface<br> +PlanetText<br> +RadioMessagePopup<br> +CraftingPlain<br> +QuestTracker<br> +MmUpgrade<br> +Collections<br> +</details> + +#### `void` interface.displayRegisteredPane(`string` paneName) +Displays a registered pane. + + +#### `?` interface.bindCanvas() +TODO + + +#### `int` interface.scale() +Returns the scale used for interfaces. + + +--- # Player |