mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Update properties API docs
This commit is contained in:
@@ -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_): Druid component to manage the size and positions with other containers relations to create a adaptable layouts.
|
||||
|
||||
<a name="text_name"></a>
|
||||
- **text_name** (_druid.text_): Basic Druid text component. Text components by default have the text size adjusting.
|
||||
|
||||
<a name="button"></a>
|
||||
- **button** (_druid.button_): Basic Druid input component. Handle input on node and provide different callbacks on touch events.
|
||||
|
||||
<a name="text_button"></a>
|
||||
- **text_button** (_druid.text_): Basic Druid text component. Text components by default have the text size adjusting.
|
||||
|
||||
<a name="druid"></a>
|
||||
- **druid** (_druid.instance_): The Druid Factory used to create components
|
||||
|
||||
<a name="selected"></a>
|
||||
- **selected** (_node_)
|
||||
|
Reference in New Issue
Block a user