mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 10:02:18 +02:00
Update docs
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
# druid.widget.fps_panel API
|
||||
|
||||
> at /druid/widget/fps_panel/fps_panel.lua
|
||||
|
||||
|
||||
## Functions
|
||||
- [init](#init)
|
||||
- [on_remove](#on_remove)
|
||||
- [update](#update)
|
||||
- [push_fps_value](#push_fps_value)
|
||||
|
||||
|
||||
## Fields
|
||||
- [root](#root)
|
||||
- [delta_time](#delta_time)
|
||||
- [collect_time](#collect_time)
|
||||
- [collect_time_counter](#collect_time_counter)
|
||||
- [graph_samples](#graph_samples)
|
||||
- [fps_samples](#fps_samples)
|
||||
- [mini_graph](#mini_graph)
|
||||
- [text_min_fps](#text_min_fps)
|
||||
- [text_fps](#text_fps)
|
||||
- [timer_id](#timer_id)
|
||||
- [previous_time](#previous_time)
|
||||
|
||||
|
||||
|
||||
### init
|
||||
|
||||
---
|
||||
```lua
|
||||
fps_panel:init()
|
||||
```
|
||||
|
||||
### on_remove
|
||||
|
||||
---
|
||||
```lua
|
||||
fps_panel:on_remove()
|
||||
```
|
||||
|
||||
### update
|
||||
|
||||
---
|
||||
```lua
|
||||
fps_panel:update([dt])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[dt]` *(any)*:
|
||||
|
||||
### push_fps_value
|
||||
|
||||
---
|
||||
```lua
|
||||
fps_panel:push_fps_value()
|
||||
```
|
||||
|
||||
|
||||
## Fields
|
||||
<a name="root"></a>
|
||||
- **root** (_node_)
|
||||
|
||||
<a name="delta_time"></a>
|
||||
- **delta_time** (_number_): in seconds
|
||||
|
||||
<a name="collect_time"></a>
|
||||
- **collect_time** (_integer_): in seconds
|
||||
|
||||
<a name="collect_time_counter"></a>
|
||||
- **collect_time_counter** (_integer_)
|
||||
|
||||
<a name="graph_samples"></a>
|
||||
- **graph_samples** (_number_)
|
||||
|
||||
<a name="fps_samples"></a>
|
||||
- **fps_samples** (_table_): Store frame time in seconds last collect_time seconds
|
||||
|
||||
<a name="mini_graph"></a>
|
||||
- **mini_graph** (_druid.widget.mini_graph_): Widget to display a several lines with different height in a row
|
||||
Init, set amount of samples and max value of value means that the line will be at max height
|
||||
Use `push_line_value` to add a new value to the line
|
||||
Or `set_line_value` to set a value to the line by index
|
||||
Setup colors inside template file (at minimum and maximum)
|
||||
|
||||
<a name="text_min_fps"></a>
|
||||
- **text_min_fps** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="text_fps"></a>
|
||||
- **text_fps** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="timer_id"></a>
|
||||
- **timer_id** (_unknown_)
|
||||
|
||||
<a name="previous_time"></a>
|
||||
- **previous_time** (_unknown_)
|
||||
|
||||
|
@@ -0,0 +1,105 @@
|
||||
# druid.widget.memory_panel API
|
||||
|
||||
> at /druid/widget/memory_panel/memory_panel.lua
|
||||
|
||||
|
||||
## Functions
|
||||
- [init](#init)
|
||||
- [on_remove](#on_remove)
|
||||
- [set_low_memory_limit](#set_low_memory_limit)
|
||||
- [push_next_value](#push_next_value)
|
||||
- [update_text_memory](#update_text_memory)
|
||||
|
||||
|
||||
## Fields
|
||||
- [root](#root)
|
||||
- [delta_time](#delta_time)
|
||||
- [samples_count](#samples_count)
|
||||
- [memory_limit](#memory_limit)
|
||||
- [mini_graph](#mini_graph)
|
||||
- [max_value](#max_value)
|
||||
- [text_per_second](#text_per_second)
|
||||
- [text_memory](#text_memory)
|
||||
- [memory](#memory)
|
||||
- [memory_samples](#memory_samples)
|
||||
- [timer_id](#timer_id)
|
||||
|
||||
|
||||
|
||||
### init
|
||||
|
||||
---
|
||||
```lua
|
||||
memory_panel:init()
|
||||
```
|
||||
|
||||
### on_remove
|
||||
|
||||
---
|
||||
```lua
|
||||
memory_panel:on_remove()
|
||||
```
|
||||
|
||||
### set_low_memory_limit
|
||||
|
||||
---
|
||||
```lua
|
||||
memory_panel:set_low_memory_limit([limit])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[limit]` *(any)*:
|
||||
|
||||
### push_next_value
|
||||
|
||||
---
|
||||
```lua
|
||||
memory_panel:push_next_value()
|
||||
```
|
||||
|
||||
### update_text_memory
|
||||
|
||||
---
|
||||
```lua
|
||||
memory_panel:update_text_memory()
|
||||
```
|
||||
|
||||
|
||||
## Fields
|
||||
<a name="root"></a>
|
||||
- **root** (_node_)
|
||||
|
||||
<a name="delta_time"></a>
|
||||
- **delta_time** (_number_)
|
||||
|
||||
<a name="samples_count"></a>
|
||||
- **samples_count** (_integer_)
|
||||
|
||||
<a name="memory_limit"></a>
|
||||
- **memory_limit** (_integer_)
|
||||
|
||||
<a name="mini_graph"></a>
|
||||
- **mini_graph** (_druid.widget.mini_graph_): Widget to display a several lines with different height in a row
|
||||
Init, set amount of samples and max value of value means that the line will be at max height
|
||||
Use `push_line_value` to add a new value to the line
|
||||
Or `set_line_value` to set a value to the line by index
|
||||
Setup colors inside template file (at minimum and maximum)
|
||||
|
||||
<a name="max_value"></a>
|
||||
- **max_value** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="text_per_second"></a>
|
||||
- **text_per_second** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="text_memory"></a>
|
||||
- **text_memory** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="memory"></a>
|
||||
- **memory** (_unknown_)
|
||||
|
||||
<a name="memory_samples"></a>
|
||||
- **memory_samples** (_table_)
|
||||
|
||||
<a name="timer_id"></a>
|
||||
- **timer_id** (_unknown_)
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# widget.mini_graph API
|
||||
# druid.widget.mini_graph API
|
||||
|
||||
> at /druid/widget/mini_graph/mini_graph.lua
|
||||
|
||||
@@ -8,8 +8,6 @@ Use `push_line_value` to add a new value to the line
|
||||
Or `set_line_value` to set a value to the line by index
|
||||
Setup colors inside template file (at minimum and maximum)
|
||||
|
||||
## Table of Contents
|
||||
|
||||
|
||||
## Functions
|
||||
- [init](#init)
|
||||
@@ -96,8 +94,6 @@ mini_graph:set_line_value(index, value)
|
||||
```
|
||||
|
||||
Set normalized to control the color of the line
|
||||
for index = 1, mini_graph:get_samples() do
|
||||
end
|
||||
|
||||
- **Parameters:**
|
||||
- `index` *(number)*:
|
||||
@@ -106,7 +102,9 @@ Set normalized to control the color of the line
|
||||
- **Example Usage:**
|
||||
|
||||
```lua
|
||||
mini_graph:set_line_value(index, math.random())
|
||||
for index = 1, mini_graph:get_samples() do
|
||||
mini_graph:set_line_value(index, math.random())
|
||||
end
|
||||
```
|
||||
### get_line_value
|
||||
|
||||
@@ -184,7 +182,7 @@ mini_graph:toggle_hide()
|
||||
```
|
||||
|
||||
- **Returns:**
|
||||
- `` *(widget.mini_graph)*:
|
||||
- `` *(druid.widget.mini_graph)*:
|
||||
|
||||
|
||||
## Fields
|
||||
@@ -192,7 +190,7 @@ mini_graph:toggle_hide()
|
||||
- **root** (_node_)
|
||||
|
||||
<a name="text_header"></a>
|
||||
- **text_header** (_druid.text_)
|
||||
- **text_header** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="icon_drag"></a>
|
||||
- **icon_drag** (_node_)
|
||||
@@ -201,7 +199,7 @@ mini_graph:toggle_hide()
|
||||
- **content** (_node_)
|
||||
|
||||
<a name="layout"></a>
|
||||
- **layout** (_druid.layout_)
|
||||
- **layout** (_druid.layout_): The component used for managing the layout of nodes, placing them inside the node size with respect to the size and pivot of each node
|
||||
|
||||
<a name="prefab_line"></a>
|
||||
- **prefab_line** (_node_)
|
||||
@@ -225,7 +223,7 @@ mini_graph:toggle_hide()
|
||||
- **values** (_table_)
|
||||
|
||||
<a name="container"></a>
|
||||
- **container** (_druid.container_)
|
||||
- **container** (_druid.container_): The component used for managing the size and positions with other containers relations to create a adaptable layouts
|
||||
|
||||
<a name="default_size"></a>
|
||||
- **default_size** (_vector3_)
|
||||
|
@@ -0,0 +1,97 @@
|
||||
# druid.widget.property_button API
|
||||
|
||||
> at /druid/widget/properties_panel/properties/property_button.lua
|
||||
|
||||
|
||||
## Functions
|
||||
- [init](#init)
|
||||
- [on_click](#on_click)
|
||||
- [set_text_property](#set_text_property)
|
||||
- [set_text_button](#set_text_button)
|
||||
- [set_color](#set_color)
|
||||
|
||||
|
||||
## Fields
|
||||
- [root](#root)
|
||||
- [container](#container)
|
||||
- [text_name](#text_name)
|
||||
- [button](#button)
|
||||
- [text_button](#text_button)
|
||||
- [druid](#druid)
|
||||
- [selected](#selected)
|
||||
|
||||
|
||||
|
||||
### init
|
||||
|
||||
---
|
||||
```lua
|
||||
property_button:init()
|
||||
```
|
||||
|
||||
### on_click
|
||||
|
||||
---
|
||||
```lua
|
||||
property_button:on_click()
|
||||
```
|
||||
|
||||
### set_text_property
|
||||
|
||||
---
|
||||
```lua
|
||||
property_button:set_text_property(text)
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `text` *(string)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.property_button)*:
|
||||
|
||||
### set_text_button
|
||||
|
||||
---
|
||||
```lua
|
||||
property_button:set_text_button(text)
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `text` *(string)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.property_button)*:
|
||||
|
||||
### set_color
|
||||
|
||||
---
|
||||
```lua
|
||||
property_button:set_color([color_value])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[color_value]` *(any)*:
|
||||
|
||||
|
||||
## Fields
|
||||
<a name="root"></a>
|
||||
- **root** (_node_)
|
||||
|
||||
<a name="container"></a>
|
||||
- **container** (_druid.container_): The component used for managing the size and positions with other containers relations to create a adaptable layouts
|
||||
|
||||
<a name="text_name"></a>
|
||||
- **text_name** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="button"></a>
|
||||
- **button** (_druid.button_): Druid component to make clickable node with various interaction callbacks
|
||||
|
||||
<a name="text_button"></a>
|
||||
- **text_button** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="druid"></a>
|
||||
- **druid** (_druid.instance_): The Druid Factory used to create components
|
||||
|
||||
<a name="selected"></a>
|
||||
- **selected** (_node_)
|
||||
|
112
api/components/widgets/properties_panel/property_checkbox_api.md
Normal file
112
api/components/widgets/properties_panel/property_checkbox_api.md
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
# druid.widget.property_checkbox API
|
||||
|
||||
> at /druid/widget/properties_panel/properties/property_checkbox.lua
|
||||
|
||||
|
||||
## Functions
|
||||
- [init](#init)
|
||||
- [set_value](#set_value)
|
||||
- [get_value](#get_value)
|
||||
- [on_click](#on_click)
|
||||
- [set_text_property](#set_text_property)
|
||||
- [on_change](#on_change)
|
||||
|
||||
|
||||
## Fields
|
||||
- [root](#root)
|
||||
- [druid](#druid)
|
||||
- [text_name](#text_name)
|
||||
- [button](#button)
|
||||
- [selected](#selected)
|
||||
- [icon](#icon)
|
||||
- [container](#container)
|
||||
- [on_change_value](#on_change_value)
|
||||
|
||||
|
||||
|
||||
### init
|
||||
|
||||
---
|
||||
```lua
|
||||
property_checkbox:init()
|
||||
```
|
||||
|
||||
### set_value
|
||||
|
||||
---
|
||||
```lua
|
||||
property_checkbox:set_value(value, [is_instant])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `value` *(boolean)*:
|
||||
- `[is_instant]` *(any)*:
|
||||
|
||||
### get_value
|
||||
|
||||
---
|
||||
```lua
|
||||
property_checkbox:get_value()
|
||||
```
|
||||
|
||||
- **Returns:**
|
||||
- `` *(boolean)*:
|
||||
|
||||
### on_click
|
||||
|
||||
---
|
||||
```lua
|
||||
property_checkbox:on_click()
|
||||
```
|
||||
|
||||
### set_text_property
|
||||
|
||||
---
|
||||
```lua
|
||||
property_checkbox:set_text_property(text)
|
||||
```
|
||||
|
||||
Set the text property of the checkbox
|
||||
|
||||
- **Parameters:**
|
||||
- `text` *(string)*:
|
||||
|
||||
### on_change
|
||||
|
||||
---
|
||||
```lua
|
||||
property_checkbox:on_change(callback)
|
||||
```
|
||||
|
||||
Set the callback function for when the checkbox value changes
|
||||
|
||||
- **Parameters:**
|
||||
- `callback` *(function)*:
|
||||
|
||||
|
||||
## Fields
|
||||
<a name="root"></a>
|
||||
- **root** (_node_)
|
||||
|
||||
<a name="druid"></a>
|
||||
- **druid** (_druid.instance_): The Druid Factory used to create components
|
||||
|
||||
<a name="text_name"></a>
|
||||
- **text_name** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="button"></a>
|
||||
- **button** (_druid.button_): Druid component to make clickable node with various interaction callbacks
|
||||
|
||||
<a name="selected"></a>
|
||||
- **selected** (_node_)
|
||||
|
||||
<a name="icon"></a>
|
||||
- **icon** (_node_)
|
||||
|
||||
<a name="container"></a>
|
||||
- **container** (_druid.container_): The component used for managing the size and positions with other containers relations to create a adaptable layouts
|
||||
|
||||
<a name="on_change_value"></a>
|
||||
- **on_change_value** (_unknown_)
|
||||
|
@@ -0,0 +1,90 @@
|
||||
# druid.widget.property_input API
|
||||
|
||||
> at /druid/widget/properties_panel/properties/property_input.lua
|
||||
|
||||
|
||||
## Functions
|
||||
- [init](#init)
|
||||
- [set_text_property](#set_text_property)
|
||||
- [set_text_value](#set_text_value)
|
||||
- [on_change](#on_change)
|
||||
|
||||
|
||||
## Fields
|
||||
- [root](#root)
|
||||
- [container](#container)
|
||||
- [text_name](#text_name)
|
||||
- [button](#button)
|
||||
- [druid](#druid)
|
||||
- [selected](#selected)
|
||||
- [rich_input](#rich_input)
|
||||
|
||||
|
||||
|
||||
### init
|
||||
|
||||
---
|
||||
```lua
|
||||
property_input:init()
|
||||
```
|
||||
|
||||
### set_text_property
|
||||
|
||||
---
|
||||
```lua
|
||||
property_input:set_text_property(text)
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `text` *(string)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.property_input)*:
|
||||
|
||||
### set_text_value
|
||||
|
||||
---
|
||||
```lua
|
||||
property_input:set_text_value(text)
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `text` *(string|number)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.property_input)*:
|
||||
|
||||
### on_change
|
||||
|
||||
---
|
||||
```lua
|
||||
property_input:on_change(callback, [callback_context])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `callback` *(fun(self: druid.widget.property_input, text: string))*:
|
||||
- `[callback_context]` *(any)*:
|
||||
|
||||
|
||||
## Fields
|
||||
<a name="root"></a>
|
||||
- **root** (_node_)
|
||||
|
||||
<a name="container"></a>
|
||||
- **container** (_druid.container_): The component used for managing the size and positions with other containers relations to create a adaptable layouts
|
||||
|
||||
<a name="text_name"></a>
|
||||
- **text_name** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="button"></a>
|
||||
- **button** (_druid.button_): Druid component to make clickable node with various interaction callbacks
|
||||
|
||||
<a name="druid"></a>
|
||||
- **druid** (_druid.instance_): The Druid Factory used to create components
|
||||
|
||||
<a name="selected"></a>
|
||||
- **selected** (_node_)
|
||||
|
||||
<a name="rich_input"></a>
|
||||
- **rich_input** (_druid.rich_input_): The component that handles a rich text input field, it's a wrapper around the druid.input component
|
||||
|
@@ -0,0 +1,171 @@
|
||||
# druid.widget.property_left_right_selector API
|
||||
|
||||
> at /druid/widget/properties_panel/properties/property_left_right_selector.lua
|
||||
|
||||
|
||||
## Functions
|
||||
- [init](#init)
|
||||
- [set_text](#set_text)
|
||||
- [on_button_left](#on_button_left)
|
||||
- [on_button_right](#on_button_right)
|
||||
- [add_step](#add_step)
|
||||
- [set_number_type](#set_number_type)
|
||||
- [set_array_type](#set_array_type)
|
||||
- [set_value](#set_value)
|
||||
- [get_value](#get_value)
|
||||
|
||||
|
||||
## Fields
|
||||
- [root](#root)
|
||||
- [druid](#druid)
|
||||
- [text_name](#text_name)
|
||||
- [button](#button)
|
||||
- [selected](#selected)
|
||||
- [value](#value)
|
||||
- [on_change_value](#on_change_value)
|
||||
- [text_value](#text_value)
|
||||
- [button_left](#button_left)
|
||||
- [button_right](#button_right)
|
||||
- [container](#container)
|
||||
- [number_type](#number_type)
|
||||
- [array_type](#array_type)
|
||||
|
||||
|
||||
|
||||
### init
|
||||
|
||||
---
|
||||
```lua
|
||||
property_left_right_selector:init()
|
||||
```
|
||||
|
||||
### set_text
|
||||
|
||||
---
|
||||
```lua
|
||||
property_left_right_selector:set_text([text])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[text]` *(any)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.property_left_right_selector)*:
|
||||
|
||||
### on_button_left
|
||||
|
||||
---
|
||||
```lua
|
||||
property_left_right_selector:on_button_left()
|
||||
```
|
||||
|
||||
### on_button_right
|
||||
|
||||
---
|
||||
```lua
|
||||
property_left_right_selector:on_button_right()
|
||||
```
|
||||
|
||||
### add_step
|
||||
|
||||
---
|
||||
```lua
|
||||
property_left_right_selector:add_step(koef)
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `koef` *(number)*: -1 0 1, on 0 will not move
|
||||
|
||||
### set_number_type
|
||||
|
||||
---
|
||||
```lua
|
||||
property_left_right_selector:set_number_type([min], [max], [is_loop], [steps])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[min]` *(any)*:
|
||||
- `[max]` *(any)*:
|
||||
- `[is_loop]` *(any)*:
|
||||
- `[steps]` *(any)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.property_left_right_selector)*:
|
||||
|
||||
### set_array_type
|
||||
|
||||
---
|
||||
```lua
|
||||
property_left_right_selector:set_array_type([array], [is_loop], [steps])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[array]` *(any)*:
|
||||
- `[is_loop]` *(any)*:
|
||||
- `[steps]` *(any)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.property_left_right_selector)*:
|
||||
|
||||
### set_value
|
||||
|
||||
---
|
||||
```lua
|
||||
property_left_right_selector:set_value(value, [is_instant])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `value` *(string|number)*:
|
||||
- `[is_instant]` *(any)*:
|
||||
|
||||
### get_value
|
||||
|
||||
---
|
||||
```lua
|
||||
property_left_right_selector:get_value()
|
||||
```
|
||||
|
||||
- **Returns:**
|
||||
- `` *(string|number)*:
|
||||
|
||||
|
||||
## Fields
|
||||
<a name="root"></a>
|
||||
- **root** (_node_)
|
||||
|
||||
<a name="druid"></a>
|
||||
- **druid** (_druid.instance_): The Druid Factory used to create components
|
||||
|
||||
<a name="text_name"></a>
|
||||
- **text_name** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="button"></a>
|
||||
- **button** (_druid.button_): Druid component to make clickable node with various interaction callbacks
|
||||
|
||||
<a name="selected"></a>
|
||||
- **selected** (_node_)
|
||||
|
||||
<a name="value"></a>
|
||||
- **value** (_string_)
|
||||
|
||||
<a name="on_change_value"></a>
|
||||
- **on_change_value** (_event_): fun(value: string|number)
|
||||
|
||||
<a name="text_value"></a>
|
||||
- **text_value** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="button_left"></a>
|
||||
- **button_left** (_druid.button_): Druid component to make clickable node with various interaction callbacks
|
||||
|
||||
<a name="button_right"></a>
|
||||
- **button_right** (_druid.button_): Druid component to make clickable node with various interaction callbacks
|
||||
|
||||
<a name="container"></a>
|
||||
- **container** (_druid.container_): The component used for managing the size and positions with other containers relations to create a adaptable layouts
|
||||
|
||||
<a name="number_type"></a>
|
||||
- **number_type** (_table_)
|
||||
|
||||
<a name="array_type"></a>
|
||||
- **array_type** (_table_)
|
||||
|
150
api/components/widgets/properties_panel/property_slider_api.md
Normal file
150
api/components/widgets/properties_panel/property_slider_api.md
Normal file
@@ -0,0 +1,150 @@
|
||||
# druid.widget.property_slider API
|
||||
|
||||
> at /druid/widget/properties_panel/properties/property_slider.lua
|
||||
|
||||
|
||||
## Functions
|
||||
- [init](#init)
|
||||
- [set_text_function](#set_text_function)
|
||||
- [set_text_property](#set_text_property)
|
||||
- [on_change](#on_change)
|
||||
- [set_value](#set_value)
|
||||
- [get_value](#get_value)
|
||||
- [update_value](#update_value)
|
||||
- [set_number_type](#set_number_type)
|
||||
|
||||
|
||||
## Fields
|
||||
- [root](#root)
|
||||
- [container](#container)
|
||||
- [druid](#druid)
|
||||
- [text_name](#text_name)
|
||||
- [text_value](#text_value)
|
||||
- [slider](#slider)
|
||||
- [on_change_value](#on_change_value)
|
||||
- [selected](#selected)
|
||||
- [min](#min)
|
||||
- [max](#max)
|
||||
- [step](#step)
|
||||
|
||||
|
||||
|
||||
### init
|
||||
|
||||
---
|
||||
```lua
|
||||
property_slider:init()
|
||||
```
|
||||
|
||||
### set_text_function
|
||||
|
||||
---
|
||||
```lua
|
||||
property_slider:set_text_function(callback)
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `callback` *(fun(value: number):string)*:
|
||||
|
||||
### set_text_property
|
||||
|
||||
---
|
||||
```lua
|
||||
property_slider:set_text_property(text)
|
||||
```
|
||||
|
||||
Sets the text property of the slider
|
||||
|
||||
- **Parameters:**
|
||||
- `text` *(string)*:
|
||||
|
||||
### on_change
|
||||
|
||||
---
|
||||
```lua
|
||||
property_slider:on_change(callback)
|
||||
```
|
||||
|
||||
Sets the callback function for when the slider value changes
|
||||
|
||||
- **Parameters:**
|
||||
- `callback` *(fun(value: number))*:
|
||||
|
||||
### set_value
|
||||
|
||||
---
|
||||
```lua
|
||||
property_slider:set_value(value, [is_instant])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `value` *(number)*:
|
||||
- `[is_instant]` *(any)*:
|
||||
|
||||
### get_value
|
||||
|
||||
---
|
||||
```lua
|
||||
property_slider:get_value()
|
||||
```
|
||||
|
||||
- **Returns:**
|
||||
- `` *(number)*:
|
||||
|
||||
### update_value
|
||||
|
||||
---
|
||||
```lua
|
||||
property_slider:update_value([value])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[value]` *(any)*:
|
||||
|
||||
### set_number_type
|
||||
|
||||
---
|
||||
```lua
|
||||
property_slider:set_number_type([min], [max], [step])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[min]` *(any)*:
|
||||
- `[max]` *(any)*:
|
||||
- `[step]` *(any)*:
|
||||
|
||||
|
||||
## Fields
|
||||
<a name="root"></a>
|
||||
- **root** (_node_)
|
||||
|
||||
<a name="container"></a>
|
||||
- **container** (_druid.container_): The component used for managing the size and positions with other containers relations to create a adaptable layouts
|
||||
|
||||
<a name="druid"></a>
|
||||
- **druid** (_druid.instance_): The Druid Factory used to create components
|
||||
|
||||
<a name="text_name"></a>
|
||||
- **text_name** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="text_value"></a>
|
||||
- **text_value** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="slider"></a>
|
||||
- **slider** (_druid.slider_): The component to make a draggable node over a line with a progress report
|
||||
|
||||
<a name="on_change_value"></a>
|
||||
- **on_change_value** (_event_): fun(value:number)
|
||||
|
||||
<a name="selected"></a>
|
||||
- **selected** (_node_)
|
||||
|
||||
<a name="min"></a>
|
||||
- **min** (_integer_)
|
||||
|
||||
<a name="max"></a>
|
||||
- **max** (_integer_)
|
||||
|
||||
<a name="step"></a>
|
||||
- **step** (_number_)
|
||||
|
66
api/components/widgets/properties_panel/property_text_api.md
Normal file
66
api/components/widgets/properties_panel/property_text_api.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# druid.widget.property_text API
|
||||
|
||||
> at /druid/widget/properties_panel/properties/property_text.lua
|
||||
|
||||
|
||||
## Functions
|
||||
- [init](#init)
|
||||
- [set_text_property](#set_text_property)
|
||||
- [set_text_value](#set_text_value)
|
||||
|
||||
|
||||
## Fields
|
||||
- [root](#root)
|
||||
- [container](#container)
|
||||
- [text_name](#text_name)
|
||||
- [text_right](#text_right)
|
||||
|
||||
|
||||
|
||||
### init
|
||||
|
||||
---
|
||||
```lua
|
||||
property_text:init()
|
||||
```
|
||||
|
||||
### set_text_property
|
||||
|
||||
---
|
||||
```lua
|
||||
property_text:set_text_property(text)
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `text` *(string)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.property_text)*:
|
||||
|
||||
### set_text_value
|
||||
|
||||
---
|
||||
```lua
|
||||
property_text:set_text_value([text])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[text]` *(string|nil)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.property_text)*:
|
||||
|
||||
|
||||
## Fields
|
||||
<a name="root"></a>
|
||||
- **root** (_node_)
|
||||
|
||||
<a name="container"></a>
|
||||
- **container** (_druid.container_): The component used for managing the size and positions with other containers relations to create a adaptable layouts
|
||||
|
||||
<a name="text_name"></a>
|
||||
- **text_name** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="text_right"></a>
|
||||
- **text_right** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
104
api/components/widgets/properties_panel/property_vector3_api.md
Normal file
104
api/components/widgets/properties_panel/property_vector3_api.md
Normal file
@@ -0,0 +1,104 @@
|
||||
# druid.widget.property_vector3 API
|
||||
|
||||
> at /druid/widget/properties_panel/properties/property_vector3.lua
|
||||
|
||||
|
||||
## Functions
|
||||
- [init](#init)
|
||||
- [set_text_property](#set_text_property)
|
||||
- [set_value](#set_value)
|
||||
|
||||
|
||||
## Fields
|
||||
- [root](#root)
|
||||
- [container](#container)
|
||||
- [text_name](#text_name)
|
||||
- [button](#button)
|
||||
- [druid](#druid)
|
||||
- [selected_x](#selected_x)
|
||||
- [selected_y](#selected_y)
|
||||
- [selected_z](#selected_z)
|
||||
- [rich_input_x](#rich_input_x)
|
||||
- [rich_input_y](#rich_input_y)
|
||||
- [rich_input_z](#rich_input_z)
|
||||
- [value](#value)
|
||||
- [on_change](#on_change)
|
||||
|
||||
|
||||
|
||||
### init
|
||||
|
||||
---
|
||||
```lua
|
||||
property_vector3:init()
|
||||
```
|
||||
|
||||
### set_text_property
|
||||
|
||||
---
|
||||
```lua
|
||||
property_vector3:set_text_property(text)
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `text` *(string)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.property_vector3)*:
|
||||
|
||||
### set_value
|
||||
|
||||
---
|
||||
```lua
|
||||
property_vector3:set_value(x, y, z)
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `x` *(number)*:
|
||||
- `y` *(number)*:
|
||||
- `z` *(number)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.property_vector3)*:
|
||||
|
||||
|
||||
## Fields
|
||||
<a name="root"></a>
|
||||
- **root** (_node_)
|
||||
|
||||
<a name="container"></a>
|
||||
- **container** (_druid.container_): The component used for managing the size and positions with other containers relations to create a adaptable layouts
|
||||
|
||||
<a name="text_name"></a>
|
||||
- **text_name** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="button"></a>
|
||||
- **button** (_druid.button_): Druid component to make clickable node with various interaction callbacks
|
||||
|
||||
<a name="druid"></a>
|
||||
- **druid** (_druid.instance_): The Druid Factory used to create components
|
||||
|
||||
<a name="selected_x"></a>
|
||||
- **selected_x** (_node_)
|
||||
|
||||
<a name="selected_y"></a>
|
||||
- **selected_y** (_node_)
|
||||
|
||||
<a name="selected_z"></a>
|
||||
- **selected_z** (_node_)
|
||||
|
||||
<a name="rich_input_x"></a>
|
||||
- **rich_input_x** (_druid.rich_input_): The component that handles a rich text input field, it's a wrapper around the druid.input component
|
||||
|
||||
<a name="rich_input_y"></a>
|
||||
- **rich_input_y** (_druid.rich_input_): The component that handles a rich text input field, it's a wrapper around the druid.input component
|
||||
|
||||
<a name="rich_input_z"></a>
|
||||
- **rich_input_z** (_druid.rich_input_): The component that handles a rich text input field, it's a wrapper around the druid.input component
|
||||
|
||||
<a name="value"></a>
|
||||
- **value** (_unknown_)
|
||||
|
||||
<a name="on_change"></a>
|
||||
- **on_change** (_unknown_)
|
||||
|
@@ -0,0 +1,366 @@
|
||||
# druid.widget.properties_panel API
|
||||
|
||||
> at /druid/widget/properties_panel/properties_panel.lua
|
||||
|
||||
|
||||
## Functions
|
||||
- [properties_constructors](#properties_constructors)
|
||||
- [init](#init)
|
||||
- [on_remove](#on_remove)
|
||||
- [on_drag_widget](#on_drag_widget)
|
||||
- [clear_created_properties](#clear_created_properties)
|
||||
- [clear](#clear)
|
||||
- [on_size_changed](#on_size_changed)
|
||||
- [update](#update)
|
||||
- [add_checkbox](#add_checkbox)
|
||||
- [add_slider](#add_slider)
|
||||
- [add_button](#add_button)
|
||||
- [add_input](#add_input)
|
||||
- [add_text](#add_text)
|
||||
- [add_left_right_selector](#add_left_right_selector)
|
||||
- [add_vector3](#add_vector3)
|
||||
- [add_inner_widget](#add_inner_widget)
|
||||
- [add_widget](#add_widget)
|
||||
- [remove](#remove)
|
||||
- [set_hidden](#set_hidden)
|
||||
- [is_hidden](#is_hidden)
|
||||
- [set_properties_per_page](#set_properties_per_page)
|
||||
- [set_page](#set_page)
|
||||
|
||||
|
||||
## Fields
|
||||
- [root](#root)
|
||||
- [scroll](#scroll)
|
||||
- [layout](#layout)
|
||||
- [container](#container)
|
||||
- [container_content](#container_content)
|
||||
- [container_scroll_view](#container_scroll_view)
|
||||
- [contaienr_scroll_content](#contaienr_scroll_content)
|
||||
- [button_hidden](#button_hidden)
|
||||
- [text_header](#text_header)
|
||||
- [paginator](#paginator)
|
||||
- [properties](#properties)
|
||||
- [content](#content)
|
||||
- [default_size](#default_size)
|
||||
- [current_page](#current_page)
|
||||
- [properties_per_page](#properties_per_page)
|
||||
- [property_checkbox_prefab](#property_checkbox_prefab)
|
||||
- [property_slider_prefab](#property_slider_prefab)
|
||||
- [property_button_prefab](#property_button_prefab)
|
||||
- [property_input_prefab](#property_input_prefab)
|
||||
- [property_text_prefab](#property_text_prefab)
|
||||
- [property_left_right_selector_prefab](#property_left_right_selector_prefab)
|
||||
- [property_vector3_prefab](#property_vector3_prefab)
|
||||
- [is_dirty](#is_dirty)
|
||||
|
||||
|
||||
|
||||
### properties_constructors
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:properties_constructors()
|
||||
```
|
||||
|
||||
List of properties functions to create a new widget. Used to not spawn non-visible widgets but keep the reference
|
||||
|
||||
### init
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:init()
|
||||
```
|
||||
|
||||
### on_remove
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:on_remove()
|
||||
```
|
||||
|
||||
### on_drag_widget
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:on_drag_widget([dx], [dy])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[dx]` *(any)*:
|
||||
- `[dy]` *(any)*:
|
||||
|
||||
### clear_created_properties
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:clear_created_properties()
|
||||
```
|
||||
|
||||
### clear
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:clear()
|
||||
```
|
||||
|
||||
### on_size_changed
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:on_size_changed([new_size])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[new_size]` *(any)*:
|
||||
|
||||
### update
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:update([dt])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[dt]` *(any)*:
|
||||
|
||||
### add_checkbox
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:add_checkbox([on_create])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[on_create]` *(fun(checkbox: druid.widget.property_checkbox)|nil)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.properties_panel)*:
|
||||
|
||||
### add_slider
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:add_slider([on_create])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[on_create]` *(fun(slider: druid.widget.property_slider)|nil)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.properties_panel)*:
|
||||
|
||||
### add_button
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:add_button([on_create])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[on_create]` *(fun(button: druid.widget.property_button)|nil)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.properties_panel)*:
|
||||
|
||||
### add_input
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:add_input([on_create])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[on_create]` *(fun(input: druid.widget.property_input)|nil)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.properties_panel)*:
|
||||
|
||||
### add_text
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:add_text([on_create])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[on_create]` *(fun(text: druid.widget.property_text)|nil)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.properties_panel)*:
|
||||
|
||||
### add_left_right_selector
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:add_left_right_selector([on_create])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[on_create]` *(fun(selector: druid.widget.property_left_right_selector)|nil)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.properties_panel)*:
|
||||
|
||||
### add_vector3
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:add_vector3([on_create])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[on_create]` *(fun(vector3: druid.widget.property_vector3)|nil)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.properties_panel)*:
|
||||
|
||||
### add_inner_widget
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:add_inner_widget(widget_class, [template], [nodes], [on_create])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `widget_class` *(<T:druid.widget>)*:
|
||||
- `[template]` *(string|nil)*:
|
||||
- `[nodes]` *(node|table<hash, node>|nil)*:
|
||||
- `[on_create]` *(fun(widget: <T:druid.widget>)|nil)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.properties_panel)*:
|
||||
|
||||
### add_widget
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:add_widget(create_widget_callback)
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `create_widget_callback` *(fun():druid.widget)*:
|
||||
|
||||
- **Returns:**
|
||||
- `` *(druid.widget.properties_panel)*:
|
||||
|
||||
### remove
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:remove([widget])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[widget]` *(any)*:
|
||||
|
||||
### set_hidden
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:set_hidden([is_hidden])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[is_hidden]` *(any)*:
|
||||
|
||||
### is_hidden
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:is_hidden()
|
||||
```
|
||||
|
||||
- **Returns:**
|
||||
- `` *(unknown)*:
|
||||
|
||||
### set_properties_per_page
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:set_properties_per_page(properties_per_page)
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `properties_per_page` *(number)*:
|
||||
|
||||
### set_page
|
||||
|
||||
---
|
||||
```lua
|
||||
properties_panel:set_page([page])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[page]` *(any)*:
|
||||
|
||||
|
||||
## Fields
|
||||
<a name="root"></a>
|
||||
- **root** (_node_)
|
||||
|
||||
<a name="scroll"></a>
|
||||
- **scroll** (_druid.scroll_)
|
||||
|
||||
<a name="layout"></a>
|
||||
- **layout** (_druid.layout_): The component used for managing the layout of nodes, placing them inside the node size with respect to the size and pivot of each node
|
||||
|
||||
<a name="container"></a>
|
||||
- **container** (_druid.container_): The component used for managing the size and positions with other containers relations to create a adaptable layouts
|
||||
|
||||
<a name="container_content"></a>
|
||||
- **container_content** (_druid.container_): The component used for managing the size and positions with other containers relations to create a adaptable layouts
|
||||
|
||||
<a name="container_scroll_view"></a>
|
||||
- **container_scroll_view** (_druid.container_): The component used for managing the size and positions with other containers relations to create a adaptable layouts
|
||||
|
||||
<a name="contaienr_scroll_content"></a>
|
||||
- **contaienr_scroll_content** (_druid.container_): The component used for managing the size and positions with other containers relations to create a adaptable layouts
|
||||
|
||||
<a name="button_hidden"></a>
|
||||
- **button_hidden** (_druid.button_): Druid component to make clickable node with various interaction callbacks
|
||||
|
||||
<a name="text_header"></a>
|
||||
- **text_header** (_druid.text_): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area
|
||||
|
||||
<a name="paginator"></a>
|
||||
- **paginator** (_druid.widget.property_left_right_selector_)
|
||||
|
||||
<a name="properties"></a>
|
||||
- **properties** (_druid.widget[]_): List of created properties
|
||||
|
||||
<a name="content"></a>
|
||||
- **content** (_node_)
|
||||
|
||||
<a name="default_size"></a>
|
||||
- **default_size** (_vector3_)
|
||||
|
||||
<a name="current_page"></a>
|
||||
- **current_page** (_integer_)
|
||||
|
||||
<a name="properties_per_page"></a>
|
||||
- **properties_per_page** (_integer_)
|
||||
|
||||
<a name="property_checkbox_prefab"></a>
|
||||
- **property_checkbox_prefab** (_node_)
|
||||
|
||||
<a name="property_slider_prefab"></a>
|
||||
- **property_slider_prefab** (_node_)
|
||||
|
||||
<a name="property_button_prefab"></a>
|
||||
- **property_button_prefab** (_node_)
|
||||
|
||||
<a name="property_input_prefab"></a>
|
||||
- **property_input_prefab** (_node_)
|
||||
|
||||
<a name="property_text_prefab"></a>
|
||||
- **property_text_prefab** (_node_)
|
||||
|
||||
<a name="property_left_right_selector_prefab"></a>
|
||||
- **property_left_right_selector_prefab** (_node_)
|
||||
|
||||
<a name="property_vector3_prefab"></a>
|
||||
- **property_vector3_prefab** (_node_)
|
||||
|
||||
<a name="is_dirty"></a>
|
||||
- **is_dirty** (_boolean_)
|
||||
|
||||
|
Reference in New Issue
Block a user