diff --git a/doc/en/scripting/ui.md b/doc/en/scripting/ui.md index 441115c8..debbad4c 100644 --- a/doc/en/scripting/ui.md +++ b/doc/en/scripting/ui.md @@ -166,12 +166,18 @@ Properties: Methods: +Here, *color* can be specified in the following ways: +- rgba: int +- r: int, g: int, b: int +- r: int, g: int, b: int, a: int + | Method | Description | |----------------------------------------------------------|---------------------------------------------------------| | data:at(x: int, y: int) | returns an RGBA pixel at the given coordinates | -| data:set(x: int, y: int, rgba: int) | updates an RGBA pixel at the given coordinates | -| data:set(x: int, y: int, r: int, g: int, b: int) | updates an RGBA pixel at the given coordinates | -| data:set(x: int, y: int, r: int, g: int, b: int, a: int) | updates an RGBA pixel at the given coordinates | +| data:set(x: int, y: int, *color*) | updates an RGBA pixel at the given coordinates | +| data:line(x1: int, y1: int, x2: int, y2: int, *color*) | draws a line with the specified RGBA color | +| data:clear() | clears the canvas | +| data:clear(*color*) | fills the canvas with the specified RGBA color | | data:update() | applies changes to the canvas and uploads it to the GPU | diff --git a/doc/ru/scripting/ui.md b/doc/ru/scripting/ui.md index cca9790e..3422e972 100644 --- a/doc/ru/scripting/ui.md +++ b/doc/ru/scripting/ui.md @@ -167,12 +167,18 @@ document["worlds-panel"]:clear() Методы: +Здесь *цвет* может быть указан следующими способами: +- rgba: int +- r: int, g: int, b: int +- r: int, g: int, b: int, a: int + | Метод | Описание | |----------------------------------------------------------|-----------------------------------------------------| | data:at(x: int, y: int) | возвращает RGBA пиксель по указанным координатам | -| data:set(x: int, y: int, rgba: int) | изменяет RGBA пиксель по указанным координатам | -| data:set(x: int, y: int, r: int, g: int, b: int) | изменяет RGBA пиксель по указанным координатам | -| data:set(x: int, y: int, r: int, g: int, b: int, a: int) | изменяет RGBA пиксель по указанным координатам | +| data:set(x: int, y: int, *цвет*) | изменяет RGBA пиксель по указанным координатам | +| data:line(x1: int, y1: int, x2: int, y2: int, *цвет*) | рисует линию с указанным RGBA цветом | +| data:clear() | очищает холст | +| data:clear(*цвет*) | заполняет холст указанным RGBA цветом | | data:update() | применяет изменения и загружает холст в видеопамять | ## Inventory (inventory)