コード例 #1
0
    void Start()
    {
        scrollViewManager = this.GetComponent<LoopScrollViewManager>();
        scrollViewManager.itemDatas.Clear();
        for (int i = 0; i < dataCount; i++)
        {
            RankItemData data = new RankItemData();
            data.rank = i + 1;
            scrollViewManager.itemDatas.Add(data);
        }
        scrollViewManager.RefreshLoopScrollView();

        // set button listener.
        UIEventListener.Get(btnAddItem).onClick = this.OnAddItem;
        UIEventListener.Get(btnRemoveItem).onClick = this.OnRemoveItem;
        if (btnRefresh != null)
            UIEventListener.Get(btnRefresh).onClick = this.OnRefreshWithTargetDataCount;
    }
コード例 #2
0
    void Start()
    {
        scrollViewManager = this.GetComponent <LoopScrollViewManager>();
        scrollViewManager.itemDatas.Clear();
        for (int i = 0; i < dataCount; i++)
        {
            RankItemData data = new RankItemData();
            data.rank = i + 1;
            scrollViewManager.itemDatas.Add(data);
        }
        scrollViewManager.RefreshLoopScrollView();

        // set button listener.
        UIEventListener.Get(btnAddItem).onClick    = this.OnAddItem;
        UIEventListener.Get(btnRemoveItem).onClick = this.OnRemoveItem;
        if (btnRefresh != null)
        {
            UIEventListener.Get(btnRefresh).onClick = this.OnRefreshWithTargetDataCount;
        }
    }