FREE TRIAL

|

☀
☾
class

Scroller

Inherits from GestureRecognizer

Scrolls the attached UIBlock's content along its AutoLayout.Axis with an iOS-like inertia and bounce effect

Remarks

If there's a ListView on the same UnityEngine.GameObject, this component will also handle scrolling the virtualized ListView

Fields

OverscrollEffect

The animation applied to content once it's scrolled past the edges of its viewport

VectorScrollMultiplier

The scroll speed multiplier for vector (e.g. mouse wheel) scrolling

Properties

DragScrolling

Allow pointer drag events to trigger a scroll

DraggableScrollbar

Indicates whether or not the Scroller should handle drag events on the ScrollbarVisual.

ScrollableChildCount

The number of child UIBlocks this scroller is capable of scrolling to.

ScrollbarVisual

The UIBlock scrollbar root

VectorScrolling

Allow mouse wheel or joystick vector events to trigger a scroll via Scroll(Interaction.Update, Vector3, Single, Int32, InputAccuracy)

Methods

CancelScroll

Abruptly stop the active scroll

DragScrollbarToPosition

Moves the scrollbar to the newScrollbarWorldPosition and scrolls the content accordingly

Scroll

Scrolls content by the provided delta along the UIBlock's AutoLayout.Axis

ScrollToIndex (2 overloads)
  1. Scrolls to the child item at the provided index index and applies a brief "after scroll" animation.
  2. Scrolls to the child item at the provided index index and optionally applies a brief "after scroll" animation.

Inherited Fields

ClickBehavior

Determines when this component should trigger click events.

DragThreshold

The threshold that must be surpassed to initiate a drag event.

LowAccuracyDragThreshold

The threshold that must be surpassed to initiate a drag event with a less physically stable input device.

Navigation

Defines a NavLink per axis-aligned direction.

ObstructDrags

When ObstructDrags == true, drag gestures will not be routed to content behind the attached UIBlock.
When false, content behind the attached UIBlock can receive drag gestures if it is draggable in a direction this component is not.

Inherited Properties

AutoSelect

Determines if this component should automatically be selected whenever it's navigated to.

Navigable

Is this component navigable?

OnSelect

Determines how this component should handle select events.

UIBlock

The attached UIBlock receiving the interaction events, Receiver

See Also

Gesture.OnClick
Gesture.OnPress
Gesture.OnRelease
Gesture.OnHover
Gesture.OnUnhover
Gesture.OnMove
Gesture.OnScroll
Gesture.OnCancel
☀
☾
In This Article
Legal EmailContact Github
Copyright © 2022 Supernova Technologies, LLC