.. default-domain:: cpp .. highlight:: cpp .. namespace:: krpc::services::UI Slider ====== .. class:: Slider A control for choosing a number by dragging a handle along a track. Added to a :class:`Canvas` or a :class:`Panel`. | Base class: :class:`InputControl` .. container:: inherited-members .. rubric:: Inherited Members * From :class:`InputControl`: :func:`changed `, :func:`set_changed ` * From :class:`Control`: :func:`interactable `, :func:`set_interactable `, :func:`color `, :func:`set_color `, :func:`tooltip `, :func:`set_tooltip ` * From :class:`Object`: :func:`rect_transform `, :func:`layout_element `, :func:`visible `, :func:`set_visible `, :func:`remove ` .. function:: float value() .. function:: void set_value(float value) The value of the slider, between :func:`Slider::min` and :func:`Slider::max`. Setting a value outside the range is refused. .. function:: float min() .. function:: void set_min(float value) The value at the low end of the slider, which is its left hand end, or the bottom of a vertical slider. Must not be greater than :func:`Slider::max`. .. function:: float max() .. function:: void set_max(float value) The value at the high end of the slider, which is its right hand end, or the top of a vertical slider. Must not be less than :func:`Slider::min`.