Scroller
A vertical or horizontal scrollbar. For more information, refer to UXML element Scroller.
Read time 6 minutesLast updated 4 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: VisualElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler
public class Scroller : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler
Static Fields
Value | Description |
|---|---|
| highButtonUssClassName | USS class name of high buttons in elements of this type. |
| horizontalVariantUssClassName | USS class name of elements of this type, when they are displayed horizontally. |
| lowButtonUssClassName | USS class name of low buttons in elements of this type. |
| sliderUssClassName | USS class name of slider elements in elements of this type. |
| ussClassName | USS class name of elements of this type. |
| verticalVariantUssClassName | USS class name of elements of this type, when they are displayed vertically. |
Constructors
Constructor | Description |
|---|---|
| Scroller() | Constructor. |
| Scroller(System.Single,System.Single,System.Action{System.Single},UnityEngine.UIElements.SliderDirection) | Constructor. |
Properties
Property | Description |
|---|---|
| direction | Direction of this scrollbar. |
| highButton | Top or right scroll button. |
| highValue | Maximum value. |
| lowButton | Bottom or left scroll button. |
| lowValue | Minimum value. |
| slider | The slider used by this scroller. |
| value | Value that defines the slider position. It lies between Scroller.lowValue and Scroller.highValue. |
Methods
Method | Description |
|---|---|
| Adjust | Updates the slider element size as a ratio of total range. A value greater than or equal to 1 will disable the Scroller. |
| ScrollPageDown | Will change the value according to the current slider pageSize. |
| ScrollPageUp | Will change the value according to the current slider pageSize. |
Events
Member | Description |
|---|---|
| valueChanged | Event sent when the slider value has changed. |