mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
move menu pages loader to Lua & add gui.load_document, file.ext(), file.prefix() & add core:gui_util module
This commit is contained in:
parent
da471bd4eb
commit
0a1a16299e
16 changed files with 156 additions and 55 deletions
|
|
@ -79,3 +79,16 @@ gui.confirm(
|
|||
```
|
||||
|
||||
Requests confirmation from the user for an action. **Does not** stop code execution.
|
||||
|
||||
```lua
|
||||
gui.load_document(
|
||||
-- Path to the xml file of the page. Example: `core:layouts/pages/main.xml`
|
||||
path: str,
|
||||
-- Name (id) of the document. Example: `core:pages/main`
|
||||
name: str
|
||||
-- Table of parameters passed to the on_open event
|
||||
args: table
|
||||
) --> str
|
||||
```
|
||||
|
||||
Loads a UI document with its script, returns the name of the document if successfully loaded.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue