Skip to content

Commit

Permalink
update doc/*/scripting/builtins/libgui.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailRis committed Jan 27, 2025
1 parent 047b177 commit 6844b4c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
13 changes: 12 additions & 1 deletion doc/en/scripting/builtins/libgui.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(...))
Expand All @@ -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(
Expand Down
11 changes: 11 additions & 0 deletions doc/ru/scripting/builtins/libgui.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ gui.escape_markup(

Экранирует разметку в тексте.

```lua
gui.alert(
-- сообщение (не переводится автоматически, используйте gui.str(...))
message: str,
-- функция, вызываемая при закрытии
on_ok: function() -> nil
)
```

Выводит окно с сообщением. **Не** останавливает выполнение кода.

```lua
gui.confirm(
-- сообщение (не переводится автоматически, используйте gui.str(...))
Expand Down

0 comments on commit 6844b4c

Please sign in to comment.