Slider
Sliders expose numeric settings with optional prefixes, suffixes, and callbacks.
Playground
Slider
25/100
Toggle compact view
Usage
You can create a Slider by calling the AddSlider
method on a Groupbox.
Arguments
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Index/ID of the slider | string | nil |
2 | Slider configuration table | table | nil |
Configuration Table
Prop
Type
Methods
You can use the following methods to interact with the slider:
SetValue
Sets the slider value.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | The new value of the slider | number | nil |
SetText
Updates the slider's text.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | The new text of the slider | string | nil |
SetMin
Sets the minimum value.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Minimum allowed value | number | nil |
SetMax
Sets the maximum value.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Maximum allowed value | number | nil |
SetDisabled
Enables or disables the slider.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Whether to disable the slider | boolean | nil |
SetVisible
Shows or hides the slider.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Whether to show the slider | boolean | nil |
SetPrefix
Sets the prefix text.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Text displayed before the value | string | nil |
SetSuffix
Sets the suffix text.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Text displayed after the value | string | nil |
OnChanged
Adds another callback function.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Callback executed on value change | function | nil |