mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 10:02:18 +02:00
Update annotations P.1
This commit is contained in:
@@ -227,33 +227,6 @@ Create component with druid: `grid = druid:new_static_grid(parent_node, prefab_
|
||||
- _Prefab node_ used to get node size and anchor
|
||||
- You can point *position_function* for animations with _static_grid:set_position_function(node, pos)_ callback. Default - *gui.set_position()*
|
||||
|
||||
|
||||
## Dynamic Grid
|
||||
[Dynamic Grid API here](https://insality.github.io/druid/modules/DynamicGrid.html)
|
||||
|
||||
### Overview
|
||||
Component for manage node positions with different node sizes.
|
||||
Unlike Static Grid, Dynamic Grid can place nodes only in one row or in one column.
|
||||
Dynamic Grid can't have gaps between elements
|
||||
- you will get error, if try spawn element far away from others.
|
||||
Dynamic Grid should have __West__, __East__, __South__ or __North__ pivot (vertical or horizontal element placement)
|
||||
|
||||
### Setup
|
||||
Create component with druid: `grid = druid:new_dynamic_grid(parent_node)`
|
||||
|
||||
Check the _parent_node_ have correct pivot point. You will get the error otherwise.
|
||||
|
||||
### Notes
|
||||
- On _add node_ grid will set node parent to _parent_node_
|
||||
- You can get array of position of every element for setup points of interest in scroll component
|
||||
- You can get size of all elements for setup size in scroll component
|
||||
- You can also bind the grid to the scroll component for auto resize scroll content size
|
||||
- Pivot of parent_node matter for node placement
|
||||
- You can point *position_function* for animations with _static_grid:set_position_function(node, pos)_ callback. Default - *gui.set_position()*
|
||||
- First node placed at Grid pivot point. Other nodes placed nearby of other nodes.
|
||||
- On *add/remove* nodes always shifted. You can point the shift side in this functions (*is_shift_left* boolean argumentp
|
||||
|
||||
|
||||
## Data List
|
||||
[Data List API here](https://insality.github.io/druid/modules/DataList.html)
|
||||
|
||||
|
@@ -148,7 +148,6 @@ Available keywords:
|
||||
- `text`: Adds a [Druid Text](01-components.md#text) component.
|
||||
- `lang_text`: Adds a [Druid Lang Text](01-components.md#lang-text) component.
|
||||
- `grid` or `static_grid`: Adds a [Druid Static Grid](01-components.md#static-grid) component. You should set up the Grid prefab for this component after generating the file.
|
||||
- `dynamic_grid`: Adds a [Druid Dynamic Grid](01-components.md#dynamic-grid) component.
|
||||
- `scroll_view`: Adds a [Druid Scroll](01-components.md#scroll) component. It also adds a `scroll_content` node with the same postfix. Ensure that it's the correct node.
|
||||
- `blocker`: Adds a [Druid Blocker](01-components.md#blocker) component.
|
||||
- `slider`: Adds a [Druid Slider](01-components.md#slider) component. You should adjust the end position of the Slider after generating the file.
|
||||
|
@@ -121,7 +121,7 @@ window.set_listener(on_window_callback)
|
||||
```
|
||||
|
||||
|
||||
## EmmyLua Annotations
|
||||
## Lua Annotations
|
||||
|
||||
[EmmyLua](https://emmylua.github.io/annotation.html) is a Lua annotation library. It is a useful tool for enabling Lua code autocompletion in editors such as [VSCode](https://github.com/EmmyLua/VSCode-EmmyLua) and [IntelliJ IDEA](https://github.com/EmmyLua/IntelliJ-EmmyLua).
|
||||
|
||||
|
Reference in New Issue
Block a user