update doc/*/scripting/ui.md
This commit is contained in:
parent
559f946a66
commit
41ec44b6ee
@ -28,12 +28,14 @@ For example:
|
||||
document["worlds-panel"]:clear()
|
||||
```
|
||||
|
||||
Access to nested elements is performed by index (starting from one).
|
||||
|
||||
## General properties and methods
|
||||
|
||||
Properties that apply to all elements:
|
||||
|
||||
| Name | Type | Read | Write | Description |
|
||||
| ------------- | ------ | ---- | ----- | ------------------------------------------- |
|
||||
| ------------- | ------- | ---- | ----- | ------------------------------------------- |
|
||||
| id | string | yes | *no* | element id |
|
||||
| pos | vec2 | yes | yes | element position inside a container |
|
||||
| wpos | vec2 | yes | yes | element position inside the window |
|
||||
@ -49,6 +51,7 @@ Properties that apply to all elements:
|
||||
| tooltipDelay | float | yes | yes | tooltip delay |
|
||||
| contentOffset | vec2 | yes | *no* | element content offset |
|
||||
| cursor | string | yes | yes | cursor displayed on hover |
|
||||
| parent | Element | yes | *no* | parent element or nil |
|
||||
|
||||
Common element methods:
|
||||
|
||||
|
||||
@ -28,12 +28,14 @@ Id элемента не может быть изменен из скрипта.
|
||||
document["worlds-panel"]:clear()
|
||||
```
|
||||
|
||||
Доступ к вложенным элементам производится по индексу (с единицы).
|
||||
|
||||
## Общие свойства и методы
|
||||
|
||||
Свойства, относящиеся ко всем элементам:
|
||||
|
||||
| Название | Тип | Чтение | Запись | Описание |
|
||||
| ------------- | ------ | ------ | ------ | ----------------------------------------- |
|
||||
| ------------- | ------- | ------ | ------ | ----------------------------------------- |
|
||||
| id | string | да | *нет* | идентификатор элемента |
|
||||
| pos | vec2 | да | да | позиция элемента внутри контейнера |
|
||||
| wpos | vec2 | да | да | позиция элемента в окне |
|
||||
@ -49,6 +51,7 @@ document["worlds-panel"]:clear()
|
||||
| tooltipDelay | float | да | да | задержка всплывающей подсказки |
|
||||
| contentOffset | vec2 | да | *нет* | смещение содержимого |
|
||||
| cursor | string | да | да | курсор, отображаемый при наведении |
|
||||
| parent | Element | да | *нет* | родительский элемент или nil |
|
||||
|
||||
Общие методы элементов:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user