Пример #1
0
 public void MoveToFirst()
 {
     m_ScrollRect = this.GetComponent<CUIScrollRectCustom>();
     m_ScrollRect.MoveToFirst();
 }
Пример #2
0
 public void FitContent()
 {
     m_ScrollRect = this.GetComponent<CUIScrollRectCustom>();
     m_ScrollRect.FitContent();
 }
Пример #3
0
 public virtual void Init()
 {
     m_ScrollRect = this.GetComponent<CUIScrollRectCustom>();
     ReloadData();
 }
Пример #4
0
 public virtual void ReloadData(bool clearList = false)
 {
     m_ScrollRect = this.GetComponent<CUIScrollRectCustom>();
     Cell.SetActive (false);
     ClearList();
     m_ListViewItems.TrimExcess();
     m_ListViewItems.Clear();
     for (int i = 0; i < this.CountItem(); i++) {
         if (i >= m_ScrollRect.content.childCount) {
             var cell = CellForIndex (i);
             AddEventClick (cell.gameObject, i);
             m_ListViewItems.Add(cell);
         } else {
             var child = m_ScrollRect.content.GetChild (i).gameObject;
             var cell = child.AddComponent<CBaseCell>();
             cell.SetupCell(m_ScrollRect.content);
             AddEventClick (child, i);
             m_ListViewItems.Add (cell);
         }
         //if (LoadLate && m_ListViewItems[i].Active)
         //	m_ListViewItems[i].Active = (i < stepLoad);
         m_ListViewItems[i].ActiveCell();
     }
     itemLoaded = stepLoad;
 }