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

summaryrefslogtreecommitdiff
path: root/doc/lua/scriptpane.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lua/scriptpane.md')
-rw-r--r--doc/lua/scriptpane.md49
1 files changed, 49 insertions, 0 deletions
diff --git a/doc/lua/scriptpane.md b/doc/lua/scriptpane.md
new file mode 100644
index 0000000..696b1a6
--- /dev/null
+++ b/doc/lua/scriptpane.md
@@ -0,0 +1,49 @@
+These pane bindings are available to scripted interface panes and include functions not specifically related to widgets within the pane.
+
+---
+
+#### `EntityId` pane.sourceEntity()
+
+Returns the entity id of the pane's source entity.
+
+---
+
+#### `void` pane.dismiss()
+
+Closes the pane.
+
+---
+
+#### `void` pane.playSound(`String` sound, [`int` loops], [`float` volume])
+
+Plays the specified sound asset, optionally looping the specified number of times or at the specified volume.
+
+---
+
+#### `bool` pane.stopAllSounds(`String` sound)
+
+Stops all instances of the given sound asset, and returns `true` if any sounds were stopped and `false` otherwise.
+
+---
+
+#### `void` pane.setTitle(`String` title, `String` subtitle)
+
+Sets the window title and subtitle.
+
+---
+
+#### `void` pane.setTitleIcon(`String` image)
+
+Sets the window icon.
+
+---
+
+#### `void` pane.addWidget(`Json` widgetConfig, [`String` widgetName])
+
+Creates a new widget with the specified config and adds it to the pane, optionally with the specified name.
+
+---
+
+#### `void` pane.removeWidget(`String` widgetName)
+
+Removes the specified widget from the pane.