private void Awake() { SerializeValueList currentValue = FlowNode_ButtonEvent.currentValue as SerializeValueList; if (currentValue == null) { return; } this.mSettings = currentValue.GetObject("settings") as GalleryItemListWindow.Settings; if (this.mSettings == null) { return; } this.AscButton.set_isOn(this.mSettings.isRarityAscending); this.DescButton.set_isOn(!this.mSettings.isRarityAscending); this.mCurrentSortType = this.mSettings.sortType; this.mIsRarityAscending = this.mSettings.isRarityAscending; this.mIsNameAscending = this.mSettings.isNameAscending; if (this.mCurrentSortType == GalleryItemListWindow.SortType.Rarity) { this.RarityButton.set_isOn(true); this.NameButton.set_isOn(false); this.AscButton.set_isOn(this.mIsRarityAscending); this.DescButton.set_isOn(!this.mIsRarityAscending); } else { this.RarityButton.set_isOn(false); this.NameButton.set_isOn(true); this.AscButton.set_isOn(this.mIsNameAscending); this.DescButton.set_isOn(!this.mIsNameAscending); } }
public void Activated(int pinID) { switch (pinID) { case 0: SerializeValueList currentValue1 = FlowNode_ButtonEvent.currentValue as SerializeValueList; if (currentValue1 == null) { break; } Toggle uiToggle = currentValue1.GetUIToggle("toggle"); if (Object.op_Equality((Object)uiToggle, (Object)this.AscButton)) { if (this.mCurrentSortType == GalleryItemListWindow.SortType.Rarity) { this.mIsRarityAscending = uiToggle.get_isOn(); break; } this.mIsNameAscending = uiToggle.get_isOn(); break; } if (this.mCurrentSortType == GalleryItemListWindow.SortType.Rarity) { this.mIsRarityAscending = !uiToggle.get_isOn(); break; } this.mIsNameAscending = !uiToggle.get_isOn(); break; case 1: this.mSettings.sortType = this.mCurrentSortType; this.mSettings.isRarityAscending = this.mIsRarityAscending; this.mSettings.isNameAscending = this.mIsNameAscending; FlowNode_GameObject.ActivateOutputLinks((Component)this, 100); break; case 2: SerializeValueList currentValue2 = FlowNode_ButtonEvent.currentValue as SerializeValueList; if (currentValue2 == null) { break; } if (Object.op_Equality((Object)currentValue2.GetUIToggle("toggle"), (Object)this.RarityButton)) { this.mCurrentSortType = GalleryItemListWindow.SortType.Rarity; this.AscButton.set_isOn(this.mIsRarityAscending); this.DescButton.set_isOn(!this.mIsRarityAscending); break; } this.mCurrentSortType = GalleryItemListWindow.SortType.Name; this.AscButton.set_isOn(this.mIsNameAscending); this.DescButton.set_isOn(!this.mIsNameAscending); break; } }
private void Start() { this.mCellCount = this.GetCellCount(); this.mCurrentTabType = EItemTabType.Used; this.mSettings = this.LoadSetting(); this.mSortType = this.mSettings.sortType; this.mIsRarityAscending = this.mSettings.isRarityAscending; this.mIsNameAscending = this.mSettings.isNameAscending; this.mRareFilters = this.mSettings.rareFilters; this.ChangeFilterButtonSprite(); this.ChangeSortButtonText(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ItemTemplate, (UnityEngine.Object)null)) { this.ItemTemplate.SetActive(false); } this.RefreshNewPage(this.mCurrentTabType, 0); }
public void Activated(int pinID) { if (!this.mInitialized) { return; } switch (pinID) { case 1: this.NextPage(); break; case 2: this.PrevPage(); break; case 3: int num = (FlowNode_ButtonEvent.currentValue as SerializeValueList).GetInt("tabtype"); if (!Enum.IsDefined(typeof(EItemTabType), (object)num)) { break; } this.ChangeTab((EItemTabType)num); break; case 4: this.SaveSettingAndOutputPin(100); break; case 5: if (this.mSortType == this.mSettings.sortType && this.mIsRarityAscending == this.mSettings.isRarityAscending && this.mIsNameAscending == this.mSettings.isNameAscending) { break; } this.SaveSetting(this.mSettings); this.mSortType = this.mSettings.sortType; this.mIsRarityAscending = this.mSettings.isRarityAscending; this.mIsNameAscending = this.mSettings.isNameAscending; this.mCurrentPage = 0; this.ChangeSortButtonText(); this.ClearAllChache(); this.RefreshNewPage(this.mCurrentTabType, 0); break; case 6: this.SaveSettingAndOutputPin(101); break; case 7: if (this.IsSameFilter(this.mRareFilters, this.mSettings.rareFilters)) { break; } this.SaveSetting(this.mSettings); this.mRareFilters = this.mSettings.rareFilters; this.ChangeFilterButtonSprite(); this.ClearAllChache(); this.RefreshNewPage(this.mCurrentTabType, 0); break; } }