UISlider
Classes
- 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 : UIFrame ? - The frame component representing the slider handle.
filled : UIFrame ? - The frame component representing the filled part of the slider.
slideArea : 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.
- UIVerticalSlider.on_initialize()
Initializes the slider and sets up event listeners.
- UIVerticalSlider.setValue(newValue: float): bool
Sets the value of the slider and updates the handle position.
- Arguments:
newValue : float
- UIVerticalSlider.invalidate()
Updates the handleNode position based on value.
- UIVerticalSlider.start_drag(): bool
Initializes the drag operation.
- UIVerticalSlider.update_drag()
Updates the slider value based on the current mouse position.
- Properties:
- UIVerticalSlider.value: float
Returns the current value.
- UIVerticalSlider.value =(newValue: float)
Sets the value of the slider and updates the handle position.
- Arguments:
newValue : float
- 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 : UIFrame ? - The frame component representing the slider handle.
filled : UIFrame ? - The frame component representing the filled part of the slider.
slideArea : 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.
- UIHorizontalSlider.on_initialize()
Initializes the slider and sets up event listeners.
- UIHorizontalSlider.setValue(newValue: float): bool
Sets the value of the slider and updates the handle position.
- Arguments:
newValue : float
- UIHorizontalSlider.invalidate()
Updates the handleNode position based on value.
- UIHorizontalSlider.start_drag(): bool
Initializes the drag operation.
- UIHorizontalSlider.update_drag()
Updates the slider value based on the current mouse position.
- Properties:
- UIHorizontalSlider.value: float
Returns the current value.
- UIHorizontalSlider.value =(newValue: float)
Sets the value of the slider and updates the handle position.
- Arguments:
newValue : float