mirror of
https://github.com/Insality/druid
synced 2025-06-27 18:37:45 +02:00
7.6 KiB
7.6 KiB
druid.widget.properties_panel API
at /druid/widget/properties_panel/properties_panel.lua
Functions
- properties_constructors
- init
- on_remove
- on_drag_widget
- clear_created_properties
- clear
- on_size_changed
- update
- add_checkbox
- add_slider
- add_button
- add_input
- add_text
- add_left_right_selector
- add_vector3
- add_inner_widget
- add_widget
- remove
- set_hidden
- is_hidden
- set_properties_per_page
- set_page
Fields
- root
- scroll
- layout
- container
- container_content
- container_scroll_view
- contaienr_scroll_content
- button_hidden
- text_header
- paginator
- properties
- content
- default_size
- current_page
- properties_per_page
- property_checkbox_prefab
- property_slider_prefab
- property_button_prefab
- property_input_prefab
- property_text_prefab
- property_left_right_selector_prefab
- property_vector3_prefab
- is_dirty
properties_constructors
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
properties_panel:init()
on_remove
properties_panel:on_remove()
on_drag_widget
properties_panel:on_drag_widget([dx], [dy])
- Parameters:
[dx]
(any):[dy]
(any):
clear_created_properties
properties_panel:clear_created_properties()
clear
properties_panel:clear()
on_size_changed
properties_panel:on_size_changed([new_size])
- Parameters:
[new_size]
(any):
update
properties_panel:update([dt])
- Parameters:
[dt]
(any):
add_checkbox
properties_panel:add_checkbox([on_create])
-
Parameters:
[on_create]
(fun(checkbox: druid.widget.property_checkbox)|nil):
-
Returns:
- `` (druid.widget.properties_panel):
add_slider
properties_panel:add_slider([on_create])
-
Parameters:
[on_create]
(fun(slider: druid.widget.property_slider)|nil):
-
Returns:
- `` (druid.widget.properties_panel):
add_button
properties_panel:add_button([on_create])
-
Parameters:
[on_create]
(fun(button: druid.widget.property_button)|nil):
-
Returns:
- `` (druid.widget.properties_panel):
add_input
properties_panel:add_input([on_create])
-
Parameters:
[on_create]
(fun(input: druid.widget.property_input)|nil):
-
Returns:
- `` (druid.widget.properties_panel):
add_text
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
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
properties_panel:add_vector3([on_create])
-
Parameters:
[on_create]
(fun(vector3: druid.widget.property_vector3)|nil):
-
Returns:
- `` (druid.widget.properties_panel):
add_inner_widget
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
properties_panel:add_widget(create_widget_callback)
-
Parameters:
create_widget_callback
(fun():druid.widget):
-
Returns:
- `` (druid.widget.properties_panel):
remove
properties_panel:remove([widget])
- Parameters:
[widget]
(any):
set_hidden
properties_panel:set_hidden([is_hidden])
- Parameters:
[is_hidden]
(any):
is_hidden
properties_panel:is_hidden()
- Returns:
- `` (unknown):
set_properties_per_page
properties_panel:set_properties_per_page(properties_per_page)
- Parameters:
properties_per_page
(number):
set_page
properties_panel:set_page([page])
- Parameters:
[page]
(any):
Fields
- root (node)
- scroll (druid.scroll): Basic Druid scroll component. Handles all scrolling behavior in Druid GUI.
- layout (druid.layout): Druid component to manage the layout of nodes, placing them inside the node size with respect to the size and pivot of each node.
- container (druid.container): Druid component to manage the size and positions with other containers relations to create a adaptable layouts.
- container_content (druid.container): Druid component to manage the size and positions with other containers relations to create a adaptable layouts.
- container_scroll_view (druid.container): Druid component to manage the size and positions with other containers relations to create a adaptable layouts.
- contaienr_scroll_content (druid.container): Druid component to manage the size and positions with other containers relations to create a adaptable layouts.
- button_hidden (druid.button): Basic Druid input component. Handle input on node and provide different callbacks on touch events.
- text_header (druid.text): Basic Druid text component. Text components by default have the text size adjusting.
- paginator (druid.widget.property_left_right_selector)
- properties (druid.widget[]): List of created properties
- content (node)
- default_size (vector3)
- current_page (integer)
- properties_per_page (integer)
- property_checkbox_prefab (node)
- property_slider_prefab (node)
- property_button_prefab (node)
- property_input_prefab (node)
- property_text_prefab (node)
- property_left_right_selector_prefab (node)
- property_vector3_prefab (node)
- is_dirty (boolean)