private void SetupRefineUI() { this.refineInfo.allRank.button.CallBackClass = base.gameObject; this.refineInfo.allRank.button.MethodToInvoke = "OnAllRankButton"; this.refineInfo.allRank.label.text = StringMaster.GetString("ChipSortModal-04"); this.refineInfo.allRank.SetSelect(this.tempData.isAllRank); this.refineInfo.allTribe.button.CallBackClass = base.gameObject; this.refineInfo.allTribe.button.MethodToInvoke = "OnAllTribeButton"; this.refineInfo.allTribe.label.text = StringMaster.GetString("ChipSortModal-04"); this.refineInfo.allTribe.SetSelect(this.tempData.isAllTribe); CMD_ChipSortModal.RefineButtonInfo[] refineContents = this.refineInfo.refineContents; for (int i = 0; i < refineContents.Length; i++) { CMD_ChipSortModal.RefineButtonInfo refineButtonInfo = refineContents[i]; CMD_ChipSortModal.RefineType refineType = refineButtonInfo.refineType; refineButtonInfo.button.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag) { this.OnRefineContentButton(refineType); }; refineButtonInfo.SetSelect((this.tempData.refineTypeList & (int)refineType) > 0); } this.reset.label.text = StringMaster.GetString("ChipSortModal-03"); this.reset.button.CallBackClass = base.gameObject; this.reset.button.MethodToInvoke = "OnResetButton"; bool value = this.CheckEnableResetButton(); this.EnableResetButton(value); }
private void OnRefineContentButton(CMD_ChipSortModal.RefineType refineType) { Action action = delegate() { this.SetSelectRefine((this.tempData.refineTypeList & (int)refineType) <= 0, refineType); CMD_ChipSortModal.sortedUserChipList = CMD_ChipSortModal.GetRefineSortList(CMD_ChipSortModal.baseUserChipList, this.tempData); bool value = this.CheckEnableResetButton(); this.EnableResetButton(value); this.tempData.isAllRank = this.CheckAllButton(CMD_ChipSortModal.rankRefineTypes); this.refineInfo.allRank.SetSelect(this.tempData.isAllRank); this.tempData.isAllTribe = this.CheckAllButton(CMD_ChipSortModal.tribeRefineTypes); this.refineInfo.allTribe.SetSelect(this.tempData.isAllTribe); this.UpdateCurrentSortCountLabel(); }; AppCoroutine.Start(this.Load(action), false); }
private void SetSelectRefine(bool value, CMD_ChipSortModal.RefineType refineType) { if (value) { this.tempData.refineTypeList |= (int)refineType; } else { this.tempData.refineTypeList |= (int)refineType; this.tempData.refineTypeList ^= (int)refineType; } foreach (CMD_ChipSortModal.RefineButtonInfo refineButtonInfo in this.refineInfo.refineContents) { if (refineButtonInfo.refineType == refineType) { refineButtonInfo.SetSelect(value); break; } } }