MinMaxSlider
A min/max slider containing a representation of a range. For more information, refer to UXML element MinMaxSlider.
Read time 10 minutesLast updated 8 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: BaseField<Vector2>
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable, IMixedValueSupport, INotifyValueChanged<Vector2>
[UxmlElement(libraryPath = "Controls")][Icon("UIToolkit/Icons/MinMaxSlider.png")]public class MinMaxSlider : BaseField<Vector2>, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable, IMixedValueSupport, INotifyValueChanged<Vector2>
Remarks
The MinMaxSlider manages navigation events in a customized manner. The MinMaxSlider has four navigation states:
-
Min thumb: adjusts the slider's minimum value if the NavigationMoveEvent aligns with the slider's direction.
-
Max thumb: adjusts the slider's maximum value if the NavigationMoveEvent aligns with the slider's direction.
-
Middle thumb: adjusts the slider's minimum and maximum values if the NavigationMoveEvent aligns with the slider's direction.
-
Default navigation: NavigationMoveEvent are ignored and handled by the default systems.
The MinMaxSlider cycles through the navigation states when a NavigationSubmitEvent is received.
Additional Resources: Slider
Static Fields
Value | Description |
|---|---|
| draggerUssClassName | USS class name of dragger elements in elements of this type. |
| inputUssClassName | USS class name of input elements in elements of this type. |
| labelUssClassName | USS class name of labels in elements of this type. |
| maxThumbUssClassName | USS class name of the maximum thumb elements in elements of this type. |
| minThumbUssClassName | USS class name of the minimum thumb elements in elements of this type. |
| movableUssClassName | USS class name of the element that is currently controlled by NavigationMoveEvent. When a NavigationSubmitEvent is received the slider cycles through the elements in the following order: |
| trackerUssClassName | USS class name of tracker elements in elements of this type. |
| ussClassName | USS class name of elements of this type. |
Constructors
Constructor | Description |
|---|---|
| MinMaxSlider() | Constructor. |
| MinMaxSlider(System.Single,System.Single,System.Single,System.Single) | Constructor. |
| MinMaxSlider(System.String,System.Single,System.Single,System.Single,System.Single) | Constructor. |
Properties
Property | Description |
|---|---|
| highLimit | This is the high limit of the slider. |
| lowLimit | This is the low limit of the slider. |
| maxValue | This is the high value of the range represented on the slider. |
| minValue | This is the low value of the range represented on the slider. |
| range | Returns the range of the low/high limits of the slider. |
| value | This is the value of the slider. This is a Vector2 where the x is the lower bound and the y is the higher bound. |