Exemplo n.º 1
0
        public void Init(List <ConceptCardData> card_datas, UnitData selected_unit, bool is_keep_page = false)
        {
            bool equipedConceptCard = this.IsIgnoreEquipedConceptCard;
            List <ConceptCardData> conceptCardDataList = new List <ConceptCardData>();

            for (int i = 0; i < card_datas.Count; ++i)
            {
                UnitData unitData = MonoSingleton <GameManager> .Instance.Player.Units.Find((Predicate <UnitData>)(u =>
                {
                    if (u.ConceptCard != null)
                    {
                        return((long)u.ConceptCard.UniqueID == (long)card_datas[i].UniqueID);
                    }
                    return(false);
                }));

                if (!equipedConceptCard || unitData == null || unitData.UniqueID == selected_unit.UniqueID)
                {
                    conceptCardDataList.Add(card_datas[i]);
                }
            }
            this.mIsChangeRectSize  = true;
            this.mIsKeepCurrentPage = is_keep_page;
            ((Component)this.mCardEmptyMessageText).get_gameObject().SetActive(conceptCardDataList.Count <= 0);
            this.mCardDatas.Clear();
            this.mCardDatas.Add((ConceptCardData)null);
            this.mCardDatas.AddRange((IEnumerable <ConceptCardData>)conceptCardDataList);
            this.Sort(ConceptCardListSortWindow.LoadDataType(), ConceptCardListSortWindow.LoadDataOrderType());
            this.mCurrentPage   = !is_keep_page ? 0 : this.mCurrentPage;
            this.mIsInitialized = true;
        }
Exemplo n.º 2
0
 public void Start()
 {
     if (this.SortToggles == null)
     {
         return;
     }
     for (int index = 0; index < this.SortToggles.Length; ++index)
     {
         // ISSUE: method pointer
         ((UnityEvent <bool>) this.SortToggles[index].toggle.onValueChanged).AddListener(new UnityAction <bool>((object)this, __methodptr(OnSelect)));
     }
     for (int index = 0; index < this.SortOrderToggles.Length; ++index)
     {
         // ISSUE: method pointer
         ((UnityEvent <bool>) this.SortOrderToggles[index].toggle.onValueChanged).AddListener(new UnityAction <bool>((object)this, __methodptr(OnSelectOrder)));
     }
     this.CurrentType = ConceptCardListSortWindow.LoadData();
     this.FirstType   = this.CurrentType;
     for (int index = 0; index < this.SortToggles.Length; ++index)
     {
         GameUtility.SetToggle(this.SortToggles[index].toggle, this.SortToggles[index].type == (this.CurrentType & (ConceptCardListSortWindow.Type) 16777215));
     }
     for (int index = 0; index < this.SortOrderToggles.Length; ++index)
     {
         GameUtility.SetToggle(this.SortOrderToggles[index].toggle, this.SortOrderToggles[index].type == (this.CurrentType & (ConceptCardListSortWindow.Type) 251658240));
     }
 }
Exemplo n.º 3
0
 public void SetSortName()
 {
     if (!Object.op_Inequality((Object)this.SortText, (Object)null))
     {
         return;
     }
     this.SortText.set_text(LocalizedText.Get(ConceptCardListSortWindow.GetTypeString(this.SortType)));
 }
Exemplo n.º 4
0
 private void RefreshSortFilterObjects()
 {
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SortTypeText, (UnityEngine.Object)null))
     {
         this.SortTypeText.set_text(LocalizedText.Get(ConceptCardListSortWindow.GetTypeString(this.CCManager.SortType)));
     }
     if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.FilterBgImages, (UnityEngine.Object)null))
     {
         return;
     }
     this.FilterBgImages.ImageIndex = this.CCManager.FilterType != (ConceptCardListFilterWindow.Type.RARITY_1 | ConceptCardListFilterWindow.Type.RARITY_2 | ConceptCardListFilterWindow.Type.RARITY_3 | ConceptCardListFilterWindow.Type.RARITY_4 | ConceptCardListFilterWindow.Type.RARITY_5) ? 1 : 0;
 }
Exemplo n.º 5
0
        private MultiConceptCard CurrMaterials()
        {
            List <ConceptCardData> card_list = new List <ConceptCardData>((IEnumerable <ConceptCardData>) this.PlayerConceptCards);

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CCManager, (UnityEngine.Object)null))
            {
                this.Filter(card_list);
                ConceptCardListSortWindow.Sort(this.CCManager.SortType, this.CCManager.SortOrderType, card_list);
            }
            this.mSortDataList.SetArray(card_list.ToArray());
            return(this.mSortDataList);
        }
Exemplo n.º 6
0
        public void Sort(ConceptCardListSortWindow.Type SortType, ConceptCardListSortWindow.Type SortOrderType)
        {
            bool flag = false;

            for (int index = 0; index < this.mCardDatas.Count; ++index)
            {
                if (this.mCardDatas[index] == null)
                {
                    flag = true;
                }
            }
            ConceptCardListSortWindow.Sort(SortType, SortOrderType, this.mCardDatas);
            if (flag)
            {
                this.mCardDatas.Insert(0, (ConceptCardData)null);
            }
            this.RefreshIcon();
            this.ResetSelectCardAnimation();
            this.SelectedCardIconActive();
        }
Exemplo n.º 7
0
 public static ConceptCardListSortWindow.Type LoadDataOrderType()
 {
     return(ConceptCardListSortWindow.LoadData() & (ConceptCardListSortWindow.Type) 251658240);
 }
Exemplo n.º 8
0
 public static ConceptCardListSortWindow.Type LoadDataType()
 {
     return(ConceptCardListSortWindow.LoadData() & (ConceptCardListSortWindow.Type) 16777215);
 }
Exemplo n.º 9
0
 public void Load()
 {
     this.CurrentType = ConceptCardListSortWindow.LoadData();
 }
Exemplo n.º 10
0
 public void LoadSortFilterData()
 {
     this.FilterType    = ConceptCardListFilterWindow.LoadData();
     this.SortType      = ConceptCardListSortWindow.LoadDataType();
     this.SortOrderType = ConceptCardListSortWindow.LoadDataOrderType();
 }
Exemplo n.º 11
0
 private void Start()
 {
     this.SortType      = ConceptCardListSortWindow.LoadDataType();
     this.SortOrderType = ConceptCardListSortWindow.LoadDataOrderType();
     this.SetSortName();
 }