update doc/*/scripting/builtins/libgui.md
This commit is contained in:
parent
047b1772f2
commit
6844b4c5e4
@ -62,6 +62,17 @@ gui.escape_markup(
|
|||||||
|
|
||||||
Escapes markup in text.
|
Escapes markup in text.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
gui.alert(
|
||||||
|
-- message (not automatically translated, use gui.str(...))
|
||||||
|
message: str,
|
||||||
|
-- function called on close
|
||||||
|
on_ok: function() -> nil
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Displays a message box. **Non-blocking**.
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
gui.confirm(
|
gui.confirm(
|
||||||
-- message (does not translate automatically, use gui.str(...))
|
-- message (does not translate automatically, use gui.str(...))
|
||||||
@ -78,7 +89,7 @@ gui.confirm(
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
Requests confirmation from the user for an action. **Does not** stop code execution.
|
Requests confirmation from the user for an action. **Non-blocking**.
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
gui.load_document(
|
gui.load_document(
|
||||||
|
|||||||
@ -59,6 +59,17 @@ gui.escape_markup(
|
|||||||
|
|
||||||
Экранирует разметку в тексте.
|
Экранирует разметку в тексте.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
gui.alert(
|
||||||
|
-- сообщение (не переводится автоматически, используйте gui.str(...))
|
||||||
|
message: str,
|
||||||
|
-- функция, вызываемая при закрытии
|
||||||
|
on_ok: function() -> nil
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Выводит окно с сообщением. **Не** останавливает выполнение кода.
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
gui.confirm(
|
gui.confirm(
|
||||||
-- сообщение (не переводится автоматически, используйте gui.str(...))
|
-- сообщение (не переводится автоматически, используйте gui.str(...))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user