2025-05-02 12:53:32 +03:00

2.6 KiB

druid.widget.property_slider API

at /druid/widget/properties_panel/properties/property_slider.lua

Functions

Fields

init


property_slider:init()

set_text_function


property_slider:set_text_function(callback)
  • Parameters:
    • callback (fun(value: number):string):

set_text_property


property_slider:set_text_property(text)

Sets the text property of the slider

  • Parameters:
    • text (string):

on_change


property_slider:on_change(callback)

Sets the callback function for when the slider value changes

  • Parameters:
    • callback (fun(value: number)):

set_value


property_slider:set_value(value, [is_instant])
  • Parameters:
    • value (number):
    • [is_instant] (any):

get_value


property_slider:get_value()
  • Returns:
    • `` (number):

update_value


property_slider:update_value([value])
  • Parameters:
    • [value] (any):

set_number_type


property_slider:set_number_type([min], [max], [step])
  • Parameters:
    • [min] (any):
    • [max] (any):
    • [step] (any):

Fields

  • root (node)

  • container (druid.container): Druid component to manage the size and positions with other containers relations to create a adaptable layouts.

  • druid (druid.instance): The Druid Factory used to create components

  • text_name (druid.text): Basic Druid text component. Text components by default have the text size adjusting.

  • text_value (druid.text): Basic Druid text component. Text components by default have the text size adjusting.

  • slider (druid.slider): Basic Druid slider component. Creates a draggable node over a line with progress reporting.

  • on_change_value (event): fun(value:number)

  • selected (node)

  • min (integer)

  • max (integer)

  • step (number)