Class ListViewScroller
Base class for behaviors which handle input and scroll list views
Inherited Members
Namespace: Unity.ListViewFramework
Syntax
public class ListViewScroller : MonoBehaviour, IScrollHandler, IEventSystemHandler
Fields
m_ListView
The target list view which will be scrolled
Declaration
[SerializeField]
protected ListViewControllerBase m_ListView
Field Value
Type | Description |
---|---|
ListViewControllerBase |
m_Scrolling
Whether or not the list is being scrolled
Declaration
protected bool m_Scrolling
Field Value
Type | Description |
---|---|
Boolean |
m_StartOffset
The value of the target list's startOffset property at the start of the current interaction
Declaration
protected float m_StartOffset
Field Value
Type | Description |
---|---|
Single |
m_StartPosition
The starting position of the pointer or interactor for the current scroll interaction
Declaration
protected Vector3 m_StartPosition
Field Value
Type | Description |
---|---|
Vector3 |
Methods
OnScroll(Vector3)
Call this method every frame during a scroll interaction (including the first frame) This is called by the EventSystem on this class if it receives any scroll events
Declaration
public virtual void OnScroll(Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position of the pointer or interactor |
OnScrollEnded()
Call this method after a scroll interaction has ended
Declaration
public virtual void OnScrollEnded()
OnScrollStarted(Vector3)
Call this method when starting a scroll interaction
Declaration
public virtual void OnScrollStarted(Vector3 start)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | start | The staring position of the pointer or interactor |
Explicit Interface Implementations
IScrollHandler.OnScroll(PointerEventData)
Declaration
void IScrollHandler.OnScroll(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.EventSystems.PointerEventData | eventData |
Implements
UnityEngine.EventSystems.IScrollHandler.OnScroll(UnityEngine.EventSystems.PointerEventData)