Class endstone::Slider¶
Represents a slider with a label.
#include <endstone/form/controls/slider.h>
Public Functions¶
Type | Name |
---|---|
Slider () = default |
|
Slider (Message label, float min, float max, float step, std::optional< float > default_value=std::nullopt) |
|
std::optional< float > | getDefaultValue () const Gets the default value of the slider. |
Message | getLabel () const Gets the label of the toggle. |
float | getMax () const Gets the maximum value of the slider. |
float | getMin () const Gets the minimum value of the slider. |
float | getStep () const Gets the step size of the slider. |
Slider & | setDefaultValue (std::optional< float > default_value) Sets the default value of the slider. |
Slider & | setLabel (Message label) Sets the label of the toggle. |
Slider & | setMax (float max) Sets the maximum value of the slider. |
Slider & | setMin (float min) Sets the minimum value of the slider. |
Slider & | setStep (float step) Sets the step size of the slider. |
Public Functions Documentation¶
function Slider [½]¶
function Slider [2/2]¶
inline explicit endstone::Slider::Slider (
Message label,
float min,
float max,
float step,
std::optional< float > default_value=std::nullopt
)
function getDefaultValue¶
Gets the default value of the slider.
Returns:
The default value of the slider.
function getLabel¶
Gets the label of the toggle.
Returns:
The label of the toggle.
function getMax¶
Gets the maximum value of the slider.
Returns:
The maximum value of the slider.
function getMin¶
Gets the minimum value of the slider.
Returns:
The minimum value of the slider.
function getStep¶
Gets the step size of the slider.
Returns:
The step size of the slider.
function setDefaultValue¶
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.
function setLabel¶
Sets the label of the toggle.
Parameters:
label
The new label for the toggle.
Returns:
A reference to the current toggle.
function setMax¶
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.
function setMin¶
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.
function setStep¶
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.
The documentation for this class was generated from the following file include/endstone/form/controls/slider.h