Tanoda
UnityEngine.UI.Extensions.FancyGridView< TItemData > Class Template Referenceabstract

グリッドレイアウトのスクロールビューを実装するための抽象基底クラス. 無限スクロールおよびスナップには対応していません. FancyScrollView<TItemData, TContext>.Context が不要な場合は 代わりに FancyGridView<TItemData> を使用します. More...

Inheritance diagram for UnityEngine.UI.Extensions.FancyGridView< TItemData >:
UnityEngine.UI.Extensions.FancyGridView< TItemData, FancyGridViewContext > UnityEngine.UI.Extensions.FancyScrollRect< TItemData[], TContext >

Classes

class  DefaultCellGroup
 デフォルトのセルグループクラス. More...
 

Public Member Functions

virtual void UpdateContents (IList< TItemData > items)
 渡されたアイテム一覧に基づいて表示内容を更新します. More...
 

Protected Member Functions

override void Initialize ()
 
abstract void SetupCellTemplate ()
 最初にセルが生成される直前に呼び出されます. Setup<TGroup>(FancyCell<TItemData, TContext>) メソッドを使用してセルテンプレートのセットアップを行ってください. More...
 
virtual void Setup< TGroup > (FancyCell< TItemData, TContext > cellTemplate)
 セルテンプレートのセットアップを行います. More...
 
override void JumpTo (int itemIndex, float alignment=0.5f)
 指定したアイテムの位置までジャンプします. More...
 
override void ScrollTo (int itemIndex, float duration, float alignment=0.5f, Action onComplete=null)
 指定したアイテムの位置まで移動します. More...
 
override void ScrollTo (int itemIndex, float duration, Ease easing, float alignment=0.5f, Action onComplete=null)
 指定したアイテムの位置まで移動します. More...
 
- Protected Member Functions inherited from UnityEngine.UI.Extensions.FancyGridView< TItemData, FancyGridViewContext >
override void Initialize ()
 
abstract void SetupCellTemplate ()
 最初にセルが生成される直前に呼び出されます. Setup<TGroup>(FancyCell<TItemData, TContext>) メソッドを使用してセルテンプレートのセットアップを行ってください. More...
 
virtual void Setup< TGroup > (FancyCell< TItemData, TContext > cellTemplate)
 セルテンプレートのセットアップを行います. More...
 
override void JumpTo (int itemIndex, float alignment=0.5f)
 指定したアイテムの位置までジャンプします. More...
 
override void ScrollTo (int itemIndex, float duration, float alignment=0.5f, Action onComplete=null)
 指定したアイテムの位置まで移動します. More...
 
override void ScrollTo (int itemIndex, float duration, Ease easing, float alignment=0.5f, Action onComplete=null)
 指定したアイテムの位置まで移動します. More...
 
- Protected Member Functions inherited from UnityEngine.UI.Extensions.FancyScrollRect< TItemData[], TContext >
override void Initialize ()
 
override void Refresh ()
 
override void Relayout ()
 
void RefreshScroller ()
 Scroller の各種状態を更新します. More...
 
override void UpdateContents (IList< TItemData > items)
 
new void UpdatePosition (float position)
 スクロール位置を更新します. More...
 
virtual void JumpTo (int itemIndex, float alignment=0.5f)
 指定したアイテムの位置までジャンプします. More...
 
virtual void ScrollTo (int index, float duration, float alignment=0.5f, Action onComplete=null)
 指定したアイテムの位置まで移動します. More...
 
virtual void ScrollTo (int index, float duration, Ease easing, float alignment=0.5f, Action onComplete=null)
 指定したアイテムの位置まで移動します. More...
 
void UpdateScrollbarSize (float viewportLength)
 ビューポートとコンテンツの長さに基づいてスクロールバーのサイズを更新します. More...
 
float ToFancyScrollViewPosition (float position)
 Scroller が扱うスクロール位置を FancyScrollRect<TItemData, TContext> が扱うスクロール位置に変換します. More...
 
float ToScrollerPosition (float position)
 FancyScrollRect<TItemData, TContext> が扱うスクロール位置を Scroller が扱うスクロール位置に変換します. More...
 
float ToScrollerPosition (float position, float alignment=0.5f)
 FancyScrollRect<TItemData, TContext> が扱うスクロール位置を Scroller が扱うスクロール位置に変換します. More...
 
void AdjustCellIntervalAndScrollOffset ()
 指定された設定を実現するための FancyScrollView<TItemData,TContext>.cellIntervalFancyScrollView<TItemData,TContext>.scrollOffset を計算して適用します. More...
 
virtual void OnValidate ()
 

Protected Attributes

float startAxisSpacing = 0f
 最初にセルを配置する軸方向のセル同士の余白. More...
 
int startAxisCellCount = 4
 最初にセルを配置する軸方向のセル数. More...
 
Vector2 cellSize = new Vector2(100f, 100f)
 セルのサイズ. More...
 
- Protected Attributes inherited from UnityEngine.UI.Extensions.FancyGridView< TItemData, FancyGridViewContext >
float startAxisSpacing
 最初にセルを配置する軸方向のセル同士の余白. More...
 
int startAxisCellCount
 最初にセルを配置する軸方向のセル数. More...
 
Vector2 cellSize
 セルのサイズ. More...
 
- Protected Attributes inherited from UnityEngine.UI.Extensions.FancyScrollRect< TItemData[], TContext >
float reuseCellMarginCount
 スクロール中にセルが再利用されるまでの余白のセル数. More...
 
float paddingHead
 コンテンツ先頭の余白. More...
 
float paddingTail
 コンテンツ末尾の余白. More...
 
float spacing
 スクロール軸方向のセル同士の余白. More...
 

Properties

sealed override GameObject CellPrefab [get]
 セルのグループ Prefab. More...
 
override float CellSize [get]
 
int DataCount [get]
 アイテムの総数. More...
 
- Properties inherited from UnityEngine.UI.Extensions.FancyGridView< TItemData, FancyGridViewContext >
sealed override GameObject CellPrefab [get]
 セルのグループ Prefab. More...
 
override float CellSize [get]
 
int DataCount [get]
 アイテムの総数. More...
 
- Properties inherited from UnityEngine.UI.Extensions.FancyScrollRect< TItemData[], TContext >
abstract float CellSize [get]
 セルのサイズ. More...
 
virtual bool Scrollable [get]
 スクロール可能かどうか. More...
 
Scroller Scroller [get]
 スクロール位置を制御する FancyScrollView.Scroller のインスタンス. More...
 

Additional Inherited Members

virtual void UpdateContents (IList< TItemData > items)
 渡されたアイテム一覧に基づいて表示内容を更新します. More...
 

Detailed Description

グリッドレイアウトのスクロールビューを実装するための抽象基底クラス. 無限スクロールおよびスナップには対応していません. FancyScrollView<TItemData, TContext>.Context が不要な場合は 代わりに FancyGridView<TItemData> を使用します.

グリッドレイアウトのスクロールビューを実装するための抽象基底クラス. 無限スクロールおよびスナップには対応していません.

Template Parameters
TItemDataアイテムのデータ型.
TContextFancyScrollView<TItemData, TContext>.Context の型.
Template Parameters
TItemDataアイテムのデータ型.
See also
FancyGridView<TItemData, TContext>

Definition at line 180 of file FancyGridView.cs.

Member Function Documentation

◆ Initialize()

override void UnityEngine.UI.Extensions.FancyGridView< TItemData >.Initialize ( )
protected

Definition at line 64 of file FancyGridView.cs.

◆ JumpTo()

override void UnityEngine.UI.Extensions.FancyGridView< TItemData >.JumpTo ( int  itemIndex,
float  alignment = 0.5f 
)
protectedvirtual

指定したアイテムの位置までジャンプします.

Parameters
itemIndexアイテムのインデックス.
alignmentビューポート内におけるセル位置の基準. 0f(先頭) ~ 1f(末尾).

Reimplemented from UnityEngine.UI.Extensions.FancyScrollRect< TItemData[], TContext >.

Definition at line 140 of file FancyGridView.cs.

◆ ScrollTo() [1/2]

override void UnityEngine.UI.Extensions.FancyGridView< TItemData >.ScrollTo ( int  itemIndex,
float  duration,
Ease  easing,
float  alignment = 0.5f,
Action  onComplete = null 
)
protected

指定したアイテムの位置まで移動します.

Parameters
itemIndexアイテムのインデックス.
duration移動にかける秒数.
easing移動に使用するイージング.
alignmentビューポート内におけるセル位置の基準. 0f(先頭) ~ 1f(末尾).
onComplete移動が完了した際に呼び出されるコールバック.

Definition at line 167 of file FancyGridView.cs.

◆ ScrollTo() [2/2]

override void UnityEngine.UI.Extensions.FancyGridView< TItemData >.ScrollTo ( int  itemIndex,
float  duration,
float  alignment = 0.5f,
Action  onComplete = null 
)
protectedvirtual

指定したアイテムの位置まで移動します.

Parameters
itemIndexアイテムのインデックス.
duration移動にかける秒数.
alignmentビューポート内におけるセル位置の基準. 0f(先頭) ~ 1f(末尾).
onComplete移動が完了した際に呼び出されるコールバック.

Reimplemented from UnityEngine.UI.Extensions.FancyScrollRect< TItemData[], TContext >.

Definition at line 153 of file FancyGridView.cs.

◆ Setup< TGroup >()

virtual void UnityEngine.UI.Extensions.FancyGridView< TItemData >.Setup< TGroup > ( FancyCell< TItemData, TContext >  cellTemplate)
protectedvirtual

セルテンプレートのセットアップを行います.

Parameters
cellTemplateセルのテンプレート.
Template Parameters
TGroupセルグループの型.

Reimplemented from UnityEngine.UI.Extensions.FancyGridView< TItemData, FancyGridViewContext >.

Reimplemented in UnityEngine.UI.Extensions.FancyGridView< TItemData >.

Type Constraints
TGroup :FancyCell 
TGroup :TItemData 
TGroup :TContext 

Definition at line 106 of file FancyGridView.cs.

◆ SetupCellTemplate()

abstract void UnityEngine.UI.Extensions.FancyGridView< TItemData >.SetupCellTemplate ( )
protectedpure virtual

最初にセルが生成される直前に呼び出されます. Setup<TGroup>(FancyCell<TItemData, TContext>) メソッドを使用してセルテンプレートのセットアップを行ってください.

using FancyScrollView;
public class MyGridView : FancyGridView\<ItemData, Context\>
{
class CellGroup : DefaultCellGroup { }
[SerializeField] Cell cellPrefab = default;
protected override void SetupCellTemplate() =\> Setup\<CellGroup\>(cellPrefab);
}
abstract void SetupCellTemplate()
最初にセルが生成される直前に呼び出されます. Setup<TGroup>(FancyCell<TItemData, TContext>) メソッドを使用してセルテンプレートのセットアップを行ってください...

Implements UnityEngine.UI.Extensions.FancyGridView< TItemData, FancyGridViewContext >.

Implemented in UnityEngine.UI.Extensions.FancyGridView< TItemData >.

◆ UpdateContents()

virtual void UnityEngine.UI.Extensions.FancyGridView< TItemData >.UpdateContents ( IList< TItemData >  items)
virtual

渡されたアイテム一覧に基づいて表示内容を更新します.

Parameters
itemsアイテム一覧.

Reimplemented from UnityEngine.UI.Extensions.FancyGridView< TItemData, FancyGridViewContext >.

Reimplemented in UnityEngine.UI.Extensions.FancyGridView< TItemData >.

Definition at line 120 of file FancyGridView.cs.

Member Data Documentation

◆ cellSize

Vector2 UnityEngine.UI.Extensions.FancyGridView< TItemData >.cellSize = new Vector2(100f, 100f)
protected

セルのサイズ.

Definition at line 40 of file FancyGridView.cs.

◆ startAxisCellCount

int UnityEngine.UI.Extensions.FancyGridView< TItemData >.startAxisCellCount = 4
protected

最初にセルを配置する軸方向のセル数.

Definition at line 35 of file FancyGridView.cs.

◆ startAxisSpacing

float UnityEngine.UI.Extensions.FancyGridView< TItemData >.startAxisSpacing = 0f
protected

最初にセルを配置する軸方向のセル同士の余白.

Definition at line 30 of file FancyGridView.cs.

Property Documentation

◆ CellPrefab

sealed override GameObject UnityEngine.UI.Extensions.FancyGridView< TItemData >.CellPrefab
getprotected

セルのグループ Prefab.

FancyGridView<TItemData, TContext> では, FancyScrollView<TItemData, TContext>.CellPrefab を最初にセルを配置する軸方向のセルコンテナとして使用します.

Definition at line 49 of file FancyGridView.cs.

◆ CellSize

override float UnityEngine.UI.Extensions.FancyGridView< TItemData >.CellSize
getprotected

Definition at line 52 of file FancyGridView.cs.

◆ DataCount

int UnityEngine.UI.Extensions.FancyGridView< TItemData >.DataCount
get

アイテムの総数.

Definition at line 59 of file FancyGridView.cs.


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