コード例 #1
0
 private void Update()
 {
     if (Object.op_Equality((Object)this.m_Window, (Object)null))
     {
         return;
     }
     if (Object.op_Inequality((Object)this.m_Text, (Object)null) && this.m_Window.sortWindow != null && this.m_Sort != this.m_Window.sortWindow.GetSectionReg())
     {
         this.m_Sort = this.m_Window.sortWindow.GetSectionReg();
         string text = UnitListSortWindow.GetText(this.m_Sort);
         if (!string.IsNullOrEmpty(text) && this.m_Text.get_text() != text)
         {
             this.m_Text.set_text(text);
         }
     }
     if (!Object.op_Inequality((Object)this.m_Image, (Object)null) || this.m_Window.filterWindow == null)
     {
         return;
     }
     UnitListFilterWindow.SelectType selectReg = this.m_Window.filterWindow.GetSelectReg(UnitListFilterWindow.SelectType.RARITY_1 | UnitListFilterWindow.SelectType.RARITY_2 | UnitListFilterWindow.SelectType.RARITY_3 | UnitListFilterWindow.SelectType.RARITY_4 | UnitListFilterWindow.SelectType.RARITY_5 | UnitListFilterWindow.SelectType.WEAPON_SLASH | UnitListFilterWindow.SelectType.WEAPON_STAB | UnitListFilterWindow.SelectType.WEAPON_BLOW | UnitListFilterWindow.SelectType.WEAPON_SHOT | UnitListFilterWindow.SelectType.WEAPON_MAG | UnitListFilterWindow.SelectType.WEAPON_NONE | UnitListFilterWindow.SelectType.BIRTH_ENV | UnitListFilterWindow.SelectType.BIRTH_WRATH | UnitListFilterWindow.SelectType.BIRTH_SAGA | UnitListFilterWindow.SelectType.BIRTH_SLOTH | UnitListFilterWindow.SelectType.BIRTH_LUST | UnitListFilterWindow.SelectType.BIRTH_WADATSUMI | UnitListFilterWindow.SelectType.BIRTH_DESERT | UnitListFilterWindow.SelectType.BIRTH_GREED | UnitListFilterWindow.SelectType.BIRTH_GLUTTONY | UnitListFilterWindow.SelectType.BIRTH_OTHER);
     if (this.m_Filter == selectReg)
     {
         return;
     }
     this.m_Filter = selectReg;
     if ((this.m_Filter ^ (UnitListFilterWindow.SelectType.RARITY_1 | UnitListFilterWindow.SelectType.RARITY_2 | UnitListFilterWindow.SelectType.RARITY_3 | UnitListFilterWindow.SelectType.RARITY_4 | UnitListFilterWindow.SelectType.RARITY_5 | UnitListFilterWindow.SelectType.WEAPON_SLASH | UnitListFilterWindow.SelectType.WEAPON_STAB | UnitListFilterWindow.SelectType.WEAPON_BLOW | UnitListFilterWindow.SelectType.WEAPON_SHOT | UnitListFilterWindow.SelectType.WEAPON_MAG | UnitListFilterWindow.SelectType.WEAPON_NONE | UnitListFilterWindow.SelectType.BIRTH_ENV | UnitListFilterWindow.SelectType.BIRTH_WRATH | UnitListFilterWindow.SelectType.BIRTH_SAGA | UnitListFilterWindow.SelectType.BIRTH_SLOTH | UnitListFilterWindow.SelectType.BIRTH_LUST | UnitListFilterWindow.SelectType.BIRTH_WADATSUMI | UnitListFilterWindow.SelectType.BIRTH_DESERT | UnitListFilterWindow.SelectType.BIRTH_GREED | UnitListFilterWindow.SelectType.BIRTH_GLUTTONY | UnitListFilterWindow.SelectType.BIRTH_OTHER)) == UnitListFilterWindow.SelectType.NONE)
     {
         this.m_Image.set_sprite(this.m_ImageDefault);
     }
     else
     {
         this.m_Image.set_sprite(this.m_ImageOn);
     }
 }
コード例 #2
0
        public void LoadSelectType()
        {
            this.m_SelectType = UnitListSortWindow.SelectType.NONE;
            string key1 = "UNITLIST_SORT";

            if (!string.IsNullOrEmpty(key1))
            {
                if (PlayerPrefsUtility.HasKey(key1))
                {
                    string s      = PlayerPrefsUtility.GetString(key1, string.Empty);
                    int    result = 0;
                    if (!string.IsNullOrEmpty(s) && int.TryParse(s, out result))
                    {
                        this.m_SelectType = (UnitListSortWindow.SelectType)result;
                    }
                }
                else
                {
                    string key2 = "UNITLIST";
                    if (!string.IsNullOrEmpty(key2))
                    {
                        this.m_SelectType = UnitListSortWindow.SelectType.NONE;
                        if (PlayerPrefsUtility.HasKey(key2))
                        {
                            GameUtility.UnitSortModes oldMode = GameUtility.UnitSortModes.Time;
                            string str = PlayerPrefsUtility.GetString(key2, string.Empty);
                            try
                            {
                                if (!string.IsNullOrEmpty(str))
                                {
                                    oldMode = (GameUtility.UnitSortModes)Enum.Parse(typeof(GameUtility.UnitSortModes), str, true);
                                }
                            }
                            catch (Exception ex)
                            {
                                DebugUtility.LogError("Unknown sort mode:" + str);
                            }
                            this.SetSection(UnitListSortWindow.ConvertSortMode(oldMode));
                        }
                        if (PlayerPrefsUtility.HasKey(key2 + "#"))
                        {
                            this.SetAlignment(UnitListSortWindow.ConvertReverse(PlayerPrefsUtility.GetInt(key2 + "#", 0) != 0));
                        }
                        this.SaveSelectType();
                    }
                }
            }
            if (this.GetSection() == UnitListSortWindow.SelectType.NONE)
            {
                this.SetSection(UnitListSortWindow.SelectType.TIME);
            }
            if (this.GetAlignment() == UnitListSortWindow.SelectType.NONE)
            {
                this.SetAlignment(UnitListSortWindow.SelectType.SYOJYUN);
            }
            this.m_SelectTypeReg = this.m_SelectType;
        }
コード例 #3
0
 protected override void Awake()
 {
     base.Awake();
     this.m_WindowController.Initialize((FlowNode)this);
     this.m_WindowController.Add((FlowWindowBase.SerializeParamBase) this.m_RootWindowParam);
     this.m_WindowController.Add((FlowWindowBase.SerializeParamBase) this.m_SortWindowParam);
     this.m_WindowController.Add((FlowWindowBase.SerializeParamBase) this.m_FilterWindowParam);
     this.m_RootWindow   = this.m_WindowController.GetWindow <UnitListRootWindow>();
     this.m_SortWindow   = this.m_WindowController.GetWindow <UnitListSortWindow>();
     this.m_FilterWindow = this.m_WindowController.GetWindow <UnitListFilterWindow>();
     if (this.m_RootWindow != null)
     {
         this.m_RootWindow.SetRoot(this);
     }
     if (this.m_SortWindow != null)
     {
         this.m_SortWindow.SetRoot(this);
     }
     if (this.m_FilterWindow == null)
     {
         return;
     }
     this.m_FilterWindow.SetRoot(this);
 }
コード例 #4
0
 public void RefreshSortPriority(UnitListSortWindow.SelectType sortType)
 {
     this.sortPriority = UnitListSortWindow.GetSortPriority(this, sortType);
 }