2017-08-02 17:21:45 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace UnityEngine.UI.Extensions.Examples
|
|
|
|
|
{
|
|
|
|
|
public class Example01ScrollView : FancyScrollView<Example01CellDto>
|
|
|
|
|
{
|
|
|
|
|
[SerializeField]
|
2018-01-20 20:08:44 +08:00
|
|
|
|
ScrollPositionController scrollPositionController = null;
|
2017-08-02 17:21:45 +08:00
|
|
|
|
|
|
|
|
|
new void Awake()
|
|
|
|
|
{
|
|
|
|
|
base.Awake();
|
|
|
|
|
scrollPositionController.OnUpdatePosition.AddListener(UpdatePosition);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void UpdateData(List<Example01CellDto> data)
|
|
|
|
|
{
|
|
|
|
|
cellData = data;
|
|
|
|
|
scrollPositionController.SetDataCount(cellData.Count);
|
|
|
|
|
UpdateContents();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|