Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


BaseSlider<TValueType>

This is a base class for the Slider fields.
Read time 10 minutesLast updated 8 days ago

Definition

[UxmlElement]public abstract class BaseSlider<TValueType> : BaseField<TValueType>, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable, IMixedValueSupport, INotifyValueChanged<TValueType>, IValueField<TValueType> where TValueType : IComparable<TValueType>

Static Fields

Value

Description

dragContainerUssClassNameUSS class name of container elements in elements of this type.
draggerBorderUssClassNameUSS class name of the dragger border element in elements of this type.
draggerUssClassNameUSS class name of dragger elements in elements of this type.
fillUssClassNameUSS class name of fill element in elements of this type.
horizontalVariantUssClassNameUSS class name of elements of this type, when they are displayed horizontally.
inputUssClassNameUSS class name of input elements in elements of this type.
labelUssClassNameUSS class name of labels in elements of this type.
movableUssClassNameUSS class name on the dragger that indicates it is currently controlled by NavigationMoveEvent. When the slider detects move events aligned with the slider's direction, it adjusts the slider's value. If it detects a navigation submit event, it removes the style, causing all navigation events to revert to their default behavior. A second navigation submit event re-applies the style to the dragger and restores the previous customized behavior.
textFieldClassNameUSS class name of the text field element in elements of this type.
trackerUssClassNameUSS class name of tracker elements in elements of this type.
ussClassNameUSS class name of elements of this type.
verticalVariantUssClassNameUSS class name of elements of this type, when they are displayed vertically.

Properties

Property

Description

directionThis is the actual property to contain the direction of the slider.
fillEnables fill to set the color and shape of a slider.
highValueThis is the maximum value that the slider encodes.
invertedThis indicates whether or not this slider is inverted. For an inverted horizontal slider, high value is located to the left, low value is located to the right For an inverted vertical slider, high value is located to the bottom, low value is located to the top.
lowValueThis is the minimum value that the slider encodes.
pageSizeRepresents the value that should be applied to the calculated scroll offset while scrolling the slider, such as when clicking within the track or clicking the slider arrows.
rangeThis is the range from the minimum value to the maximum value of the slider.
showInputFieldThe visibility of the optional field inside the slider control.
valueThe actual value of the slider.

Methods

Method

Description

AdjustDragElementMethod used to adjust the dragelement. Mainly used in a scroller.
ApplyInputDeviceDeltaCalled when the user is dragging the label to update the value contained in the field.

Inheritance

Inherited Members