update doc/*/scripting/builtins/libgui.md

This commit is contained in:
MihailRis 2025-01-27 08:29:39 +03:00
parent 047b1772f2
commit 6844b4c5e4
2 changed files with 23 additions and 1 deletions

View File

@ -62,6 +62,17 @@ gui.escape_markup(
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
gui.confirm(
-- 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
gui.load_document(

View File

@ -59,6 +59,17 @@ gui.escape_markup(
Экранирует разметку в тексте.
```lua
gui.alert(
-- сообщение (не переводится автоматически, используйте gui.str(...))
message: str,
-- функция, вызываемая при закрытии
on_ok: function() -> nil
)
```
Выводит окно с сообщением. **Не** останавливает выполнение кода.
```lua
gui.confirm(
-- сообщение (не переводится автоматически, используйте gui.str(...))