private void RefreshUI() { if (GuildManager.Instance.MyGuildInviteSetting != null) { this.isSelected = !GuildManager.Instance.MyGuildInviteSetting.verify; base.FindTransform("BtnSettingSelect").get_gameObject().SetActive(this.isSelected); this.roleMinLV = GuildManager.Instance.MyGuildInviteSetting.roleMinLv; base.FindTransform("guildRoleMinLVText").GetComponent <Text>().set_text(this.roleMinLV.ToString()); this.inputField.set_text(GuildManager.Instance.MyGuildnfo.notice); this.IsClickArrow = false; base.FindTransform("selectList").get_gameObject().SetActive(this.IsClickArrow); Transform transform = base.FindTransform("selectList").FindChild("ListselectList").FindChild("Contair"); if (transform.get_childCount() <= 0) { for (int i = 0; i < this.joinLvMinList.get_Count(); i++) { GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("GuildButtonItem"); instantiate2Prefab.set_name("guildItem_" + i); GuildButtonItem component = instantiate2Prefab.GetComponent <GuildButtonItem>(); instantiate2Prefab.get_transform().SetParent(transform); instantiate2Prefab.GetComponent <RectTransform>().set_localScale(Vector3.get_one()); instantiate2Prefab.GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickSelectRoleMinLV); component.Refresh(this.joinLvMinList.get_Item(i)); } } base.FindTransform("quitBtn").get_gameObject().SetActive(GuildManager.Instance.CheckMemberHasPrivilege(GuildPrivilegeState.DissolveGuild)); } }
private void RefreshCreateGuildPanel() { this.IsClickArrow = false; this.currentRoleMinLv = this.joinLvMinList.get_Item(0); this.GuildTransformDic.get_Item(GuildUIState.GuildCreate).FindChild("selectList").get_gameObject().SetActive(this.IsClickArrow); this.GuildTransformDic.get_Item(GuildUIState.GuildCreate).FindChild("guildRoleMinLVText").GetComponent <Text>().set_text(this.currentRoleMinLv.ToString()); this.GuildTransformDic.get_Item(GuildUIState.GuildCreate).FindChild("guildNameText").GetComponent <InputField>().set_text(string.Empty); this.GuildTransformDic.get_Item(GuildUIState.GuildCreate).FindChild("guildNoticeText").GetComponent <InputField>().set_text(string.Empty); GongHuiDengJi gongHuiDengJi = DataReader <GongHuiDengJi> .Get(1); string text = "x" + gongHuiDengJi.num.ToString(); Items items = DataReader <Items> .Get(gongHuiDengJi.gold); if (items != null) { int id; if (gongHuiDengJi.gold < 13) { id = items.littleIcon; } else { id = items.icon; } Image component = base.FindTransform("CostIcon").GetComponent <Image>(); ResourceManager.SetSprite(component, GameDataUtils.GetIcon(id)); } if ((long)gongHuiDengJi.num > BackpackManager.Instance.OnGetGoodCount(gongHuiDengJi.gold)) { text = string.Format("<color=#ff0000>{0}</color>", text); } this.GuildTransformDic.get_Item(GuildUIState.GuildCreate).FindChild("CostRegion").FindChild("CostNum").GetComponent <Text>().set_text(text); Transform transform = this.GuildTransformDic.get_Item(GuildUIState.GuildCreate).FindChild("selectList").FindChild("ListselectList").FindChild("Contair"); if (transform.get_childCount() <= 0) { for (int i = 0; i < this.joinLvMinList.get_Count(); i++) { GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("GuildButtonItem"); instantiate2Prefab.set_name("guildItem_" + i); GuildButtonItem component2 = instantiate2Prefab.GetComponent <GuildButtonItem>(); instantiate2Prefab.get_transform().SetParent(transform); instantiate2Prefab.GetComponent <RectTransform>().set_localScale(Vector3.get_one()); instantiate2Prefab.GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickSelectRoleMinLV); component2.Refresh(this.joinLvMinList.get_Item(i)); } } }