-----Developed under unity3d version 5.x-----
Endless loop scroll view for NGUI.
- easy to add base endless , loop scrollview in your project for showing up big data(particularly the rank list)
- dynamic add new data to the endless scroll view.
- dynamic delete data in list without resetting the scroll view(delete all the item recreate them all.)
- ......Some script for NGUI's scrollview extension......
- base endless and loop feature,both vertical and horizon(done)
- dynamic add new data(done)
- dynamic delete(done)
- dynamic calculate min loop item cout(done)
- Very easy to use.Just deal with the data list (add, delete , update) and Call one method**[RefreshLoopScrollView()]** everything will be done.
- Find [DebugSystem] to enable or disable the log
Fill the data list and call RefreshLoopScrollView();
scrollViewManager = this.GetComponent();
scrollViewManager.itemDatas.Clear();
for (int i = 0; i < dataCount; i++)
{
RankItemData data = new RankItemData();
data.rank = i + 1;
scrollViewManager.itemDatas.Add(data);
}
scrollViewManager.RefreshLoopScrollView();
add new item data to list and call RefreshLoopScrollView();
for (int i = 0; i < perAddItemCount; i++)
{
RankItemData data = new RankItemData();
data.rank = (addCount++) * 100;
scrollViewManager.itemDatas.Add(data);
}
scrollViewManager.RefreshLoopScrollView();
remove item data from data list call RefreshLoopScrollView();
if (this.scrollViewManager.itemDatas.Count == 0)
{
Debuger.LogWarning("@ item count is zero.");
return;
}
int index = Random.Range(0, scrollViewManager.itemDatas.Count);
this.scrollViewManager.itemDatas.RemoveAt(index);
this.scrollViewManager.RefreshLoopScrollView();