endstone::Slider
Represents a slider with a label.
Functions:
| Name | Description |
|---|---|
Slider | |
Slider | |
getDefaultValue | Gets the default value of the slider. |
getLabel | Gets the label of the toggle. |
getMax | Gets the maximum value of the slider. |
getMin | Gets the minimum value of the slider. |
getStep | Gets the step size of the slider. |
setDefaultValue | Sets the default value of the slider. |
setLabel | Sets the label of the toggle. |
setMax | Sets the maximum value of the slider. |
setMin | Sets the minimum value of the slider. |
setStep | Sets the step size of the slider. |
Slider
Slider() = defaultSlider(Message label, float min, float max, float step,
std::optional<float> default_value = std::nullopt) getDefaultValue
std::optional<float> getDefaultValue() constGets the default value of the slider.
Returns:
The default value of the slider.
getLabel
Message getLabel() constGets the label of the toggle.
Returns:
The label of the toggle.
getMax
float getMax() constGets the maximum value of the slider.
Returns:
The maximum value of the slider.
getMin
float getMin() constGets the minimum value of the slider.
Returns:
The minimum value of the slider.
getStep
float getStep() constGets the step size of the slider.
Returns:
The step size of the slider.
setDefaultValue
Slider &setDefaultValue(std::optional<float> default_value)Sets the default value of the slider.
Parameters:
default_valueThe new default value for the slider.
Returns:
A reference to the current slider, for function chaining.
setLabel
Slider &setLabel(Message label)Sets the label of the toggle.
Parameters:
labelThe new label for the toggle.
Returns:
A reference to the current toggle.
setMax
Slider &setMax(float max)Sets the maximum value of the slider.
Parameters:
maxThe new maximum value for the slider.
Returns:
A reference to the current slider, for function chaining.
setMin
Slider &setMin(float min)Sets the minimum value of the slider.
Parameters:
minThe new minimum value for the slider.
Returns:
A reference to the current slider, for function chaining.
setStep
Slider &setStep(float step)Sets the step size of the slider.
Parameters:
stepThe new step size for the slider.
Returns:
A reference to the current slider, for function chaining.