Tanoda
UnityEngine.UI.Extensions.Scroller Class Reference

スクロール位置の制御を行うコンポーネント. More...

Inheritance diagram for UnityEngine.UI.Extensions.Scroller:

Public Member Functions

void OnValueChanged (Action< float > callback)
 スクロール位置が変化したときのコールバックを設定します. More...
 
void OnSelectionChanged (Action< int > callback)
 選択位置が変化したときのコールバックを設定します. More...
 
void SetTotalCount (int totalCount)
 アイテムの総数を設定します. More...
 
void ScrollTo (float position, float duration, Action onComplete=null)
 指定した位置まで移動します. More...
 
void ScrollTo (float position, float duration, Ease easing, Action onComplete=null)
 指定した位置まで移動します. More...
 
void ScrollTo (float position, float duration, EasingFunction easingFunction, Action onComplete=null)
 指定した位置まで移動します. More...
 
void JumpTo (int index)
 指定したインデックスの位置までジャンプします. More...
 
MovementDirection GetMovementDirection (int sourceIndex, int destIndex)
 sourceIndex から destIndex に移動する際の移動方向を返します. スクロール範囲が無制限に設定されている場合は, 最短距離の移動方向を返します. More...
 

Protected Member Functions

override void Start ()
 

Properties

float ViewportSize [get]
 ビューポートのサイズ. More...
 
ScrollDirection ScrollDirection [get]
 スクロール方向. More...
 
MovementType MovementType [get, set]
 コンテンツがスクロール範囲を越えて移動するときに使用する挙動. More...
 
float Elasticity [get, set]
 コンテンツがスクロール範囲を越えて移動するときに使用する弾力性の量. More...
 
float ScrollSensitivity [get, set]
 ViewportSize の端から端まで Drag したときのスクロール位置の変化量. More...
 
bool Inertia [get, set]
 慣性を使用するかどうか. true を指定すると慣性が有効に, false を指定すると慣性が無効になります. More...
 
float DecelerationRate [get, set]
 スクロールの減速率. Inertiatrue の場合のみ有効です. More...
 
bool SnapEnabled [get, set]
 true ならスナップし, falseならスナップしません. More...
 
bool Draggable [get, set]
 Drag 入力を受付けるかどうか. More...
 
Scrollbar Scrollbar [get]
 スクロールバーのオブジェクト. More...
 
float Position [get, set]
 現在のスクロール位置. More...
 

Detailed Description

スクロール位置の制御を行うコンポーネント.

Definition at line 13 of file Scroller.cs.

Member Function Documentation

◆ GetMovementDirection()

MovementDirection UnityEngine.UI.Extensions.Scroller.GetMovementDirection ( int  sourceIndex,
int  destIndex 
)

sourceIndex から destIndex に移動する際の移動方向を返します. スクロール範囲が無制限に設定されている場合は, 最短距離の移動方向を返します.

Parameters
sourceIndex移動元のインデックス.
destIndex移動先のインデックス.
Returns

Definition at line 297 of file Scroller.cs.

◆ JumpTo()

void UnityEngine.UI.Extensions.Scroller.JumpTo ( int  index)

指定したインデックスの位置までジャンプします.

Parameters
indexアイテムのインデックス.

Definition at line 279 of file Scroller.cs.

◆ OnSelectionChanged()

void UnityEngine.UI.Extensions.Scroller.OnSelectionChanged ( Action< int >  callback)

選択位置が変化したときのコールバックを設定します.

Parameters
callback選択位置が変化したときのコールバック.

◆ OnValueChanged()

void UnityEngine.UI.Extensions.Scroller.OnValueChanged ( Action< float >  callback)

スクロール位置が変化したときのコールバックを設定します.

Parameters
callbackスクロール位置が変化したときのコールバック.

◆ ScrollTo() [1/3]

void UnityEngine.UI.Extensions.Scroller.ScrollTo ( float  position,
float  duration,
Action  onComplete = null 
)

指定した位置まで移動します.

Parameters
positionスクロール位置. 0f ~ totalCount - 1f の範囲.
duration移動にかける秒数.
onComplete移動が完了した際に呼び出されるコールバック.

◆ ScrollTo() [2/3]

void UnityEngine.UI.Extensions.Scroller.ScrollTo ( float  position,
float  duration,
Ease  easing,
Action  onComplete = null 
)

指定した位置まで移動します.

Parameters
positionスクロール位置. 0f ~ totalCount - 1f の範囲.
duration移動にかける秒数.
easing移動に使用するイージング.
onComplete移動が完了した際に呼び出されるコールバック.

◆ ScrollTo() [3/3]

void UnityEngine.UI.Extensions.Scroller.ScrollTo ( float  position,
float  duration,
EasingFunction  easingFunction,
Action  onComplete = null 
)

指定した位置まで移動します.

Parameters
positionスクロール位置. 0f ~ totalCount - 1f の範囲.
duration移動にかける秒数.
easingFunction移動に使用するイージング関数.
onComplete移動が完了した際に呼び出されるコールバック.

Definition at line 252 of file Scroller.cs.

◆ SetTotalCount()

void UnityEngine.UI.Extensions.Scroller.SetTotalCount ( int  totalCount)

アイテムの総数を設定します.

totalCount を元に最大スクロール位置を計算します.

Parameters
totalCountアイテムの総数.

◆ Start()

override void UnityEngine.UI.Extensions.Scroller.Start ( )
protected

Definition at line 197 of file Scroller.cs.

Property Documentation

◆ DecelerationRate

float UnityEngine.UI.Extensions.Scroller.DecelerationRate
getset

スクロールの減速率. Inertiatrue の場合のみ有効です.

Definition at line 80 of file Scroller.cs.

◆ Draggable

bool UnityEngine.UI.Extensions.Scroller.Draggable
getset

Drag 入力を受付けるかどうか.

Definition at line 110 of file Scroller.cs.

◆ Elasticity

float UnityEngine.UI.Extensions.Scroller.Elasticity
getset

コンテンツがスクロール範囲を越えて移動するときに使用する弾力性の量.

Definition at line 47 of file Scroller.cs.

◆ Inertia

bool UnityEngine.UI.Extensions.Scroller.Inertia
getset

慣性を使用するかどうか. true を指定すると慣性が有効に, false を指定すると慣性が無効になります.

Definition at line 69 of file Scroller.cs.

◆ MovementType

MovementType UnityEngine.UI.Extensions.Scroller.MovementType
getset

コンテンツがスクロール範囲を越えて移動するときに使用する挙動.

Definition at line 36 of file Scroller.cs.

◆ Position

float UnityEngine.UI.Extensions.Scroller.Position
getset

現在のスクロール位置.

Definition at line 127 of file Scroller.cs.

◆ Scrollbar

Scrollbar UnityEngine.UI.Extensions.Scroller.Scrollbar
get

スクロールバーのオブジェクト.

Definition at line 121 of file Scroller.cs.

◆ ScrollDirection

ScrollDirection UnityEngine.UI.Extensions.Scroller.ScrollDirection
get

スクロール方向.

Definition at line 29 of file Scroller.cs.

◆ ScrollSensitivity

float UnityEngine.UI.Extensions.Scroller.ScrollSensitivity
getset

ViewportSize の端から端まで Drag したときのスクロール位置の変化量.

Definition at line 58 of file Scroller.cs.

◆ SnapEnabled

bool UnityEngine.UI.Extensions.Scroller.SnapEnabled
getset

true ならスナップし, falseならスナップしません.

スナップを有効にすると, 慣性でスクロールが止まる直前に最寄りのセルへ移動します.

Definition at line 99 of file Scroller.cs.

◆ ViewportSize

float UnityEngine.UI.Extensions.Scroller.ViewportSize
get

ビューポートのサイズ.

Definition at line 20 of file Scroller.cs.


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