.. _stdlib_ui_slider_component: ======== UISlider ======== +++++++ Classes +++++++ .. _struct-ui_slider_component-UIVerticalSlider: .. das:attribute:: UIVerticalSlider : UIComponent .. note:: ``UIFrame`` component is automatically added to the node if it is not already present A vertical slider UI component with min, max, value, and step. If step <= 0, the slider moves smoothly. Otherwise, it snaps to step increments. :Fields: * **minValue** : float = 0f - Minimum value of the slider. * **maxValue** : float = 1f - Maximum value of the slider. * **step** : float = 0f - Step size. If <= 0, slider is smooth. * **onChange** : lambda<(value:float):void> - Called when the value changes (only on manual drag). * **handle** : :ref:`UIFrame ` ? - The frame component representing the slider handle. * **filled** : :ref:`UIFrame ` ? - The frame component representing the filled part of the slider. * **slideArea** : :ref:`UIFrame ` ? - The frame component representing the interactive part of the slider. If left empty, the frame of the node with UIVerticalSlider itself will be used. .. _function-ui_slider_component_UIVerticalSlider_rq_on_initialize_UIVerticalSlider: .. das:function:: UIVerticalSlider.on_initialize() Initializes the slider and sets up event listeners. .. _function-ui_slider_component_UIVerticalSlider_rq_setValue_UIVerticalSlider_float: .. das:function:: UIVerticalSlider.setValue(newValue: float) : bool Sets the value of the slider and updates the handle position. :Arguments: * **newValue** : float .. _function-ui_slider_component_UIVerticalSlider_rq_invalidate_UIVerticalSlider: .. das:function:: UIVerticalSlider.invalidate() Updates the handleNode position based on value. .. _function-ui_slider_component_UIVerticalSlider_rq_start_drag_UIVerticalSlider: .. das:function:: UIVerticalSlider.start_drag() : bool Initializes the drag operation. .. _function-ui_slider_component_UIVerticalSlider_rq_update_drag_UIVerticalSlider: .. das:function:: UIVerticalSlider.update_drag() Updates the slider value based on the current mouse position. :Properties: .. _function-ui_slider_component__dot__rq_value_UIVerticalSlider: .. das:operator:: UIVerticalSlider.value() : float Returns the current value. .. _function-ui_slider_component__dot__rq_value_rq_clone_UIVerticalSlider_float: .. das:operator:: UIVerticalSlider.value =(newValue: float) Sets the value of the slider and updates the handle position. :Arguments: * **newValue** : float .. _struct-ui_slider_component-UIHorizontalSlider: .. das:attribute:: UIHorizontalSlider : UIComponent .. note:: ``UIFrame`` component is automatically added to the node if it is not already present A horizontal slider UI component with min, max, value, and step. If step <= 0, the slider moves smoothly. Otherwise, it snaps to step increments. :Fields: * **minValue** : float = 0f - Minimum value of the slider. * **maxValue** : float = 1f - Maximum value of the slider. * **step** : float = 0f - Step size. If <= 0, slider is smooth. * **onChange** : lambda<(value:float):void> - Called when the value changes (only on manual drag). * **handle** : :ref:`UIFrame ` ? - The frame component representing the slider handle. * **filled** : :ref:`UIFrame ` ? - The frame component representing the filled part of the slider. * **slideArea** : :ref:`UIFrame ` ? - The frame component representing the interactive part of the slider. If left empty, the frame of the node with UIHorizontalSlider itself will be used. .. _function-ui_slider_component_UIHorizontalSlider_rq_on_initialize_UIHorizontalSlider: .. das:function:: UIHorizontalSlider.on_initialize() Initializes the slider and sets up event listeners. .. _function-ui_slider_component_UIHorizontalSlider_rq_setValue_UIHorizontalSlider_float: .. das:function:: UIHorizontalSlider.setValue(newValue: float) : bool Sets the value of the slider and updates the handle position. :Arguments: * **newValue** : float .. _function-ui_slider_component_UIHorizontalSlider_rq_invalidate_UIHorizontalSlider: .. das:function:: UIHorizontalSlider.invalidate() Updates the handleNode position based on value. .. _function-ui_slider_component_UIHorizontalSlider_rq_start_drag_UIHorizontalSlider: .. das:function:: UIHorizontalSlider.start_drag() : bool Initializes the drag operation. .. _function-ui_slider_component_UIHorizontalSlider_rq_update_drag_UIHorizontalSlider: .. das:function:: UIHorizontalSlider.update_drag() Updates the slider value based on the current mouse position. :Properties: .. _function-ui_slider_component__dot__rq_value_UIHorizontalSlider: .. das:operator:: UIHorizontalSlider.value() : float Returns the current value. .. _function-ui_slider_component__dot__rq_value_rq_clone_UIHorizontalSlider_float: .. das:operator:: UIHorizontalSlider.value =(newValue: float) Sets the value of the slider and updates the handle position. :Arguments: * **newValue** : float