Interface: UiSliderEcsComponent
Defined in: ui/components/ui-slider-component.ts:51
A horizontal drag track holding a numeric value between minValue and
maxValue. Attach alongside a UiInteractableEcsComponent (the drag
surface createUiSliderEcsSystem reads pointer position against) and a
RectTransformEcsComponent; use createSlider for the common "track +
handle + fill" visual assembly, or build your own from these same pieces.
Extends
Properties
fill?
optionalfill?:number
Defined in: ui/components/ui-slider-component.ts:41
The entity id of an optional fill visual - a child RectTransformEcsComponent
stretch-anchored from the track's left edge, whose anchorMax.x
createUiSliderEcsSystem drives to track value every tick.
Inherited from
handle
handle:
number
Defined in: ui/components/ui-slider-component.ts:16
The entity id of the slider's drag handle - a child RectTransformEcsComponent
whose anchorMin.x/anchorMax.x createUiSliderEcsSystem drives to
track value every tick.
Inherited from
UiSliderRequiredOptions.handle
maxValue
maxValue:
number
Defined in: ui/components/ui-slider-component.ts:28
The value value maps to at the track's right edge. Defaults to 1.
Inherited from
UiSliderDefaultedOptions.maxValue
minValue
minValue:
number
Defined in: ui/components/ui-slider-component.ts:25
The value value maps to at the track's left edge. Defaults to 0.
Inherited from
UiSliderDefaultedOptions.minValue
onValueChanged
readonlyonValueChanged:ParameterizedForgeEvent<number>
Defined in: ui/components/ui-slider-component.ts:58
Raised whenever value changes - by a drag, or by a direct
slider.value = write followed by createUiSliderEcsSystem's next tick
re-deriving the handle/fill visuals from it. Passes the new value.
value
value:
number
Defined in: ui/components/ui-slider-component.ts:31
The slider's current value, clamped to [minValue, maxValue]. Defaults to minValue.
Inherited from
UiSliderDefaultedOptions.value
wholeNumbers
wholeNumbers:
boolean
Defined in: ui/components/ui-slider-component.ts:34
Rounds value to the nearest whole number whenever it's set by a drag. Defaults to false.