Skip to Content
⚠ Under Construction
ReferenceC++ APISlider

endstone::Slider

Represents a slider with a label.

Functions:

NameDescription
Slider
Slider
getDefaultValueGets the default value of the slider.
getLabelGets the label of the toggle.
getMaxGets the maximum value of the slider.
getMinGets the minimum value of the slider.
getStepGets the step size of the slider.
setDefaultValueSets the default value of the slider.
setLabelSets the label of the toggle.
setMaxSets the maximum value of the slider.
setMinSets the minimum value of the slider.
setStepSets 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.

Last updated on