mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41: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
|
|
@ -76,3 +76,16 @@ gui.confirm(
|
|||
```
|
||||
|
||||
Запрашивает у пользователя подтверждение действия. **Не** останавливает выполнение кода.
|
||||
|
||||
```lua
|
||||
gui.load_document(
|
||||
-- Путь к xml файлу страницы. Пример: `core:layouts/pages/main.xml`
|
||||
path: str,
|
||||
-- Имя (id) документа. Пример: `core:pages/main`
|
||||
name: str
|
||||
-- Таблица параметров, передаваемых в событие on_open
|
||||
args: table
|
||||
) --> str
|
||||
```
|
||||
|
||||
Загружает UI документ с его скриптом, возвращает имя документа, если успешно загружен.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue