Slider
The slider UI element allows the users to select a value by sliding a thumb control along a track.
To add a slider UI element to your mod, use the utils.addSlider
function. This function takes the following parameters:
section
: The section to add the slider to.key
: A unique key to identify the slider.title
: The title of the slider.defaultValue
: The default value of the slider.description
: A description of the slider (optional).minimumValue
: The minimum value of the slider (optional, defaults to 0).maximumValue
: The maximum value of the slider (optional, defaults to 100).
Here's an example of how to use the utils.addSlider
function:
You can access the current value of a slider using the getValueForKey
function:
Last updated