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() = default
Slider(Message label, float min, float max, float step,
std::optional<float> default_value = std::nullopt)
getDefaultValue
std::optional<float> getDefaultValue() const
Gets the default value of the slider.
Returns:
The default value of the slider.
getLabel
Message getLabel() const
Gets the label of the toggle.
Returns:
The label of the toggle.
getMax
float getMax() const
Gets the maximum value of the slider.
Returns:
The maximum value of the slider.
getMin
float getMin() const
Gets the minimum value of the slider.
Returns:
The minimum value of the slider.
getStep
float getStep() const
Gets 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_value
The 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:
label
The 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:
max
The 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:
min
The 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:
step
The new step size for the slider.
Returns:
A reference to the current slider, for function chaining.