Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/doc/lua
diff options
context:
space:
mode:
authorBottinator22 <59987380+Bottinator22@users.noreply.github.com>2025-02-08 13:09:52 -0800
committerGitHub <noreply@github.com>2025-02-08 13:09:52 -0800
commit060fdb655039e735cc731aa28dbbd4f821d897c1 (patch)
treeefb0feb2c38362a1ca68d25f72d10b86645bfef9 /doc/lua
parent480d87d15ff4e3e91354266aa28f0891a8575ab6 (diff)
move new interface bindings to their own file (also minor formatting changes)
Diffstat (limited to 'doc/lua')
-rw-r--r--doc/lua/openstarbound/interface.md63
1 files changed, 63 insertions, 0 deletions
diff --git a/doc/lua/openstarbound/interface.md b/doc/lua/openstarbound/interface.md
new file mode 100644
index 0000000..1214865
--- /dev/null
+++ b/doc/lua/openstarbound/interface.md
@@ -0,0 +1,63 @@
+---
+# 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 widget 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.
+
+---