private void RefreshTabBtnByType(GuildWarVSInfoUI.GuildWarVSType type) { if (type == GuildWarVSInfoUI.GuildWarVSType.GuildWarQualificationType || type == GuildWarVSInfoUI.GuildWarVSType.GuildWarThisWeekType) { this.SetBtnLightAndDim(this.guildWarQualificationBtn.get_gameObject(), "y_fenye3", true); this.SetBtnLightAndDim(this.guildWarWeekVSBtn.get_gameObject(), "y_fenye4", false); } else if (type == GuildWarVSInfoUI.GuildWarVSType.GuildWarLastWeekType) { this.SetBtnLightAndDim(this.guildWarWeekVSBtn.get_gameObject(), "y_fenye3", true); this.SetBtnLightAndDim(this.guildWarQualificationBtn.get_gameObject(), "y_fenye4", false); this.guildwarBtnStateText.set_text(string.Empty); this.btnAddActivePoint.get_gameObject().SetActive(false); } this.RefreshGuildWarBtnState(); }
private void RefreshUI() { if (GuildWarManager.Instance.GuildWarTimeStep < GuildWarTimeStep.GWTS.ELIGIBILITY) { this.guildWarBtnState = GuildWarVSInfoUI.GuildWarVSType.GuildWarQualificationType; this.isShowThisWeekVS = false; this.guildWarQualificationBtn.get_transform().FindChild("btnText").GetComponent <Text>().set_text("入围军团"); } else { this.guildWarBtnState = GuildWarVSInfoUI.GuildWarVSType.GuildWarThisWeekType; this.isShowThisWeekVS = true; this.guildWarQualificationBtn.get_transform().FindChild("btnText").GetComponent <Text>().set_text("军团对战"); } this.RefreshGuildWarBtnState(); this.RefreshUIByType(this.guildWarBtnState); this.RefreshTabBtnByType(this.guildWarBtnState); }
private void RefreshUIByType(GuildWarVSInfoUI.GuildWarVSType type) { if (type == GuildWarVSInfoUI.GuildWarVSType.GuildWarQualificationType) { if (this.guildWeekVSPanel.get_activeSelf()) { this.guildWeekVSPanel.SetActive(false); } if (!this.guildWarQualificationPanel.get_activeSelf()) { this.guildWarQualificationPanel.SetActive(true); } this.RefreshQualificationPanel(); } else if (type == GuildWarVSInfoUI.GuildWarVSType.GuildWarLastWeekType) { if (!this.guildWeekVSPanel.get_activeSelf()) { this.guildWeekVSPanel.SetActive(true); } if (this.guildWarQualificationPanel.get_activeSelf()) { this.guildWarQualificationPanel.SetActive(false); } this.RefreshLastWeekVSPanel(); } else if (type == GuildWarVSInfoUI.GuildWarVSType.GuildWarThisWeekType) { if (!this.guildWeekVSPanel.get_activeSelf()) { this.guildWeekVSPanel.SetActive(true); } if (this.guildWarQualificationPanel.get_activeSelf()) { this.guildWarQualificationPanel.SetActive(false); } this.RefreshThisWeekVSPanel(); } }
private void OnClickTab(GameObject go) { if (go == this.guildWarQualificationBtn.get_gameObject()) { GuildWarVSInfoUI.GuildWarVSType guildWarVSType = (!this.isShowThisWeekVS) ? GuildWarVSInfoUI.GuildWarVSType.GuildWarQualificationType : GuildWarVSInfoUI.GuildWarVSType.GuildWarThisWeekType; if (this.guildWarBtnState == guildWarVSType) { return; } this.guildWarBtnState = guildWarVSType; this.RefreshUIByType(this.guildWarBtnState); this.RefreshTabBtnByType(this.guildWarBtnState); } else if (go == this.guildWarWeekVSBtn.get_gameObject()) { if (this.guildWarBtnState == GuildWarVSInfoUI.GuildWarVSType.GuildWarLastWeekType) { return; } this.RefreshLastWeekVSPanel(); } }
private void OnWeekVsInfosRes(int week) { if (week == 0) { if (!this.guildWarOpenTimeRoot.get_activeSelf()) { this.guildWarOpenTimeRoot.SetActive(true); } this.UpdateWeekVSData(GuildWarManager.Instance.ThisWeekVSInfoData); this.RefreshGuildWarBtnState(); } else if (week == 1) { if (GuildWarManager.Instance.LastWeekVSInfoData == null || GuildWarManager.Instance.LastWeekVSInfoData.first8Infos == null || GuildWarManager.Instance.LastWeekVSInfoData.first8Infos.get_Count() <= 0) { UIManagerControl.Instance.ShowToastText("没有上周战绩"); return; } if (!this.guildWeekVSPanel.get_activeSelf()) { this.guildWeekVSPanel.SetActive(true); } if (this.guildWarQualificationPanel.get_activeSelf()) { this.guildWarQualificationPanel.SetActive(false); } if (this.guildWarOpenTimeRoot.get_activeSelf()) { this.guildWarOpenTimeRoot.SetActive(false); } this.ResetGuildVSInfo(); this.guildWarBtnState = GuildWarVSInfoUI.GuildWarVSType.GuildWarLastWeekType; this.RefreshTabBtnByType(this.guildWarBtnState); this.UpdateWeekVSData(GuildWarManager.Instance.LastWeekVSInfoData); } }