Ejemplo n.º 1
0
 public int GetNumberOfCells(LoopScroller scroller)
 {
     if (m_Datas == null)
     {
         return(0);
     }
     return(m_Datas.Count);
 }
Ejemplo n.º 2
0
        public virtual LoopScrollerCellView GetCellView(LoopScroller scroller, int dataIndex, int cellIndex)
        {
            TCellView cellView = scroller.GetCellView(m_ItemTemplate) as TCellView;

            cellView.dataIndex = dataIndex;
            cellView.name      = "Cell " + dataIndex.ToString();
            cellView.SetData(m_Datas[dataIndex]);
            if (!cellView.gameObject.activeSelf)
            {
                cellView.gameObject.SetActive(true);
            }
            return(cellView);
        }
Ejemplo n.º 3
0
 public virtual float GetCellViewSize(LoopScroller scroller, int dataIndex)
 {
     return(m_ItemTemplate.PreferredWidth);
 }