| | |
| | | return _activeCellViewsStartIndex % NumberOfCells; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// This is the last data index showing in the scroller's visible area |
| | | /// </summary> |
| | |
| | | var go = Instantiate(cellPrefab.gameObject); |
| | | cellView = go.GetComponent<EnhancedScrollerCellView>(); |
| | | cellView.transform.SetParent(_container); |
| | | |
| | | RectTransform rt = go.GetComponent<RectTransform>(); |
| | | rt.anchoredPosition3D = new Vector3(rt.anchoredPosition3D.x, rt.anchoredPosition3D.y, 0); |
| | | rt.localEulerAngles = Vector3.zero; |
| | | } |
| | | |
| | | return cellView; |
| | |
| | | else |
| | | go.AddComponent<HorizontalLayoutGroup>(); |
| | | _container = go.GetComponent<RectTransform>(); |
| | | _container.localEulerAngles = Vector3.zero; |
| | | |
| | | // set the containers anchor and pivot |
| | | if (scrollDirection == ScrollDirectionEnum.Vertical) |
| | |
| | | _RefreshActive(); |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// This is fired by the tweener when the snap tween is completed |
| | | /// </summary> |