Merge pull request #976 from MihailRis/screenshot-function

add gui.screenshot function
This commit is contained in:
MihailRis 2026-09-18 00:43:29 +03:00 • committed by GitHub
commit 507f32f1e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 62 additions and 0 deletions

View file

@ -61,6 +61,12 @@ gui.set_active_frame(
-- Used for custom projection (e.g., in 3D)
[optional] cursorLocator: function() -> number, number
)
-- Creates a screenshot of a frame as a Canvas object if the frame ID is specified, or the entire window if nil.
gui.screenshot(
-- ID of the frame created via gui.create_frame
[optional] frameId: str
) -> Canvas | nil
```
## Markup

View file

@ -69,6 +69,12 @@ gui.set_active_frame(
-- Используется для пользовательской проекции (например в 3D)
[опционально] cursorLocator: function() -> number, number
)
-- Создаёт снимок фрейма в виде объекта Canvas если указан id фрейма, или всего окна, в случае nil.
gui.screenshot(
-- id фрейма, созданного через gui.create_frame
[опционально] frameId: str
) -> Canvas | nil
```
## Разметка