Пример #1
0
    void PageRefresh()
    {
        int addition = sourceIndex.Equals(1) ? 1 : 0;

        //업데이트
        maxPage        = (source.Count - 1 + addition) / items.Length + 1;
        pageInput.text = currentPage.ToString();
        maxText.text   = maxPage.ToString();
        for (int i = 0; i < items.Length; i++)
        {
            int idx = i + (currentPage - 1) * items.Length;
            if (idx >= source.Count + addition)
            {
                items[i].gameObject.SetActive(false);
            }
            else
            {
                items[i].gameObject.SetActive(true);
                if (idx < source.Count)
                {
                    items[i].SetInfo(idx, source[idx], source[idx].Equals(selectEle), checkList.Contains(source[idx]));
                }
                else
                {
                    items[i].SetAddition();
                }
            }
        }
        AllCheckMark.SetActive(IsAllChecked());
        listText.text = string.Format("List [{0}]", checkList.Count);
        ClearBtnRefresh();
        InfoRefresh();
    }
Пример #2
0
 public void ItemCheck(OrbitalElements ele)
 {
     if (checkList.Contains(ele))
     {
         checkList.Remove(ele);
     }
     else
     {
         checkList.Add(ele);
     }
     AllCheckMark.SetActive(IsAllChecked());
     PageRefresh();
 }