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

summaryrefslogtreecommitdiff
path: root/doc/lua/scriptpane.md
blob: 696b1a65f712fc04bc73b6368c55832fd0e10337 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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.