Tanoda
UnityEngine.UI.Extensions.ContentScrollSnapHorizontal Class Reference
Inheritance diagram for UnityEngine.UI.Extensions.ContentScrollSnapHorizontal:

Classes

class  CurrentItemChangeEvent
 
class  FoundItemToSnapToEvent
 
struct  MoveInfo
 
class  SnappedToItemEvent
 
class  StartMovementEvent
 

Public Member Functions

void GoTo (MoveInfo info)
 Function for going to a specific screen. *Note the index is based on a zero-starting index. More...
 
void NextItem ()
 Function for going to the next item *Note the next item is the item to the right of the current item, this is not based on child order More...
 
void PreviousItem ()
 Function for going to the previous item *Note the next item is the item to the left of the current item, this is not based on child order More...
 
void UpdateLayout ()
 Function for recalculating the size of the content & the snap positions, such as when you remove or add a child More...
 
void UpdateLayoutAndMoveTo (MoveInfo info)
 Recalculates the size of the content & snap positions, and moves to a new item afterwards. More...
 
void OnBeginDrag (PointerEventData ped)
 
void OnEndDrag (PointerEventData ped)
 

Public Attributes

bool ignoreInactiveItems = true
 
MoveInfo startInfo = new MoveInfo(MoveInfo.IndexType.positionIndex, 0)
 
GameObject prevButton
 
GameObject nextButton
 
GameObject pagination
 
int snappingVelocityThreshold = 50
 
bool jumpToItem = false
 
float lerpTime = .3f
 

Properties

StartMovementEvent MovementStarted [get, set]
 
CurrentItemChangeEvent CurrentItemChanged [get, set]
 
FoundItemToSnapToEvent ItemFoundToSnap [get, set]
 
SnappedToItemEvent ItemSnappedTo [get, set]
 
bool Moving [get]
 Returns if the SnapScroll is moving More...
 
bool Sliding [get]
 Returns if the SnapScroll is moving because of a touch More...
 
bool Lerping [get]
 Returns if the SnapScroll is moving programmatically More...
 
int ClosestItemIndex [get]
 Returns the closest item's index *Note this is zero based, and based on position not child order More...
 
int LerpTargetIndex [get]
 Returns the lerpTarget's index *Note this is zero-based, and based on position not child order More...
 

Detailed Description

Definition at line 12 of file ContentScrollSnapHorizontal.cs.

Member Function Documentation

◆ GoTo()

void UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.GoTo ( MoveInfo  info)

Function for going to a specific screen. *Note the index is based on a zero-starting index.

Parameters
infoAll of the info about how you want it to move

Definition at line 319 of file ContentScrollSnapHorizontal.cs.

◆ NextItem()

void UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.NextItem ( )

Function for going to the next item *Note the next item is the item to the right of the current item, this is not based on child order

Definition at line 406 of file ContentScrollSnapHorizontal.cs.

◆ OnBeginDrag()

void UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.OnBeginDrag ( PointerEventData  ped)

Definition at line 462 of file ContentScrollSnapHorizontal.cs.

◆ OnEndDrag()

void UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.OnEndDrag ( PointerEventData  ped)

Definition at line 471 of file ContentScrollSnapHorizontal.cs.

◆ PreviousItem()

void UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.PreviousItem ( )

Function for going to the previous item *Note the next item is the item to the left of the current item, this is not based on child order

Definition at line 425 of file ContentScrollSnapHorizontal.cs.

◆ UpdateLayout()

void UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.UpdateLayout ( )

Function for recalculating the size of the content & the snap positions, such as when you remove or add a child

Definition at line 443 of file ContentScrollSnapHorizontal.cs.

◆ UpdateLayoutAndMoveTo()

void UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.UpdateLayoutAndMoveTo ( MoveInfo  info)

Recalculates the size of the content & snap positions, and moves to a new item afterwards.

Parameters
infoAll of the info about how you want it to move

Definition at line 453 of file ContentScrollSnapHorizontal.cs.

Member Data Documentation

◆ ignoreInactiveItems

bool UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.ignoreInactiveItems = true

Definition at line 24 of file ContentScrollSnapHorizontal.cs.

◆ jumpToItem

bool UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.jumpToItem = false

Definition at line 34 of file ContentScrollSnapHorizontal.cs.

◆ lerpTime

float UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.lerpTime = .3f

Definition at line 36 of file ContentScrollSnapHorizontal.cs.

◆ nextButton

GameObject UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.nextButton

Definition at line 27 of file ContentScrollSnapHorizontal.cs.

◆ pagination

GameObject UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.pagination

Definition at line 28 of file ContentScrollSnapHorizontal.cs.

◆ prevButton

GameObject UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.prevButton

Definition at line 26 of file ContentScrollSnapHorizontal.cs.

◆ snappingVelocityThreshold

int UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.snappingVelocityThreshold = 50

Definition at line 30 of file ContentScrollSnapHorizontal.cs.

◆ startInfo

MoveInfo UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.startInfo = new MoveInfo(MoveInfo.IndexType.positionIndex, 0)

Definition at line 25 of file ContentScrollSnapHorizontal.cs.

Property Documentation

◆ ClosestItemIndex

int UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.ClosestItemIndex
get

Returns the closest item's index *Note this is zero based, and based on position not child order

Definition at line 155 of file ContentScrollSnapHorizontal.cs.

◆ CurrentItemChanged

CurrentItemChangeEvent UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.CurrentItemChanged
getset

Definition at line 57 of file ContentScrollSnapHorizontal.cs.

◆ ItemFoundToSnap

FoundItemToSnapToEvent UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.ItemFoundToSnap
getset

Definition at line 72 of file ContentScrollSnapHorizontal.cs.

◆ ItemSnappedTo

SnappedToItemEvent UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.ItemSnappedTo
getset

Definition at line 87 of file ContentScrollSnapHorizontal.cs.

◆ Lerping

bool UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.Lerping
get

Returns if the SnapScroll is moving programmatically

Definition at line 143 of file ContentScrollSnapHorizontal.cs.

◆ LerpTargetIndex

int UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.LerpTargetIndex
get

Returns the lerpTarget's index *Note this is zero-based, and based on position not child order

Definition at line 166 of file ContentScrollSnapHorizontal.cs.

◆ MovementStarted

StartMovementEvent UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.MovementStarted
getset

Definition at line 42 of file ContentScrollSnapHorizontal.cs.

◆ Moving

bool UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.Moving
get

Returns if the SnapScroll is moving

Definition at line 122 of file ContentScrollSnapHorizontal.cs.

◆ Sliding

bool UnityEngine.UI.Extensions.ContentScrollSnapHorizontal.Sliding
get

Returns if the SnapScroll is moving because of a touch

Definition at line 133 of file ContentScrollSnapHorizontal.cs.


The documentation for this class was generated from the following file: