blob: ede9840ce6bba0c3b94bb0fc8e35e782214a19c9 (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
---
# 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.
---
#### `CanvasWidget` interface.bindCanvas(`string` name, [`bool` ignoreInterfaceScale = false])
Binds the canvas widget on the main interface with the specified name as userdata for easy access. The `CanvasWidget` has the same methods as described in `widget.md`.
- **ignoreInterfaceScale** is used to ignore the current interface scaling and bind the canvas with the screen size.
---
#### `int` interface.scale()
Returns the scale used for interfaces.
---
|