local UIGuildMainSetPanel = UIViewClass() function UIGuildMainSetPanel:OnOpened(context) UIUtils.SetLabelText(self.UICommonPopUp.txt_Title, Const_IDS.IDS_GuildSettings_Title) UIUtils.SetActive(self.event_EditApp, CTL.Guild.IsGuildCommunityFunctionOpen()) UIUtils.SetActive(self.event_GuildName, MDL.Player.GetPublicSentimentUnLock()) end function UIGuildMainSetPanel:OnButtonClicked(comp) if self.event_GuildName == comp then if self:CheckAuthority(MDL.Guild.AuthorityEnum.GuildName) then UIManager.OpenView(Const_UI_Lua.UIEnum.UIGuildChangeNamePanel, nil, "Name/UIRenamePanel") self:CloseView() end elseif self.event_Emblem == comp then if self:CheckAuthority(MDL.Guild.AuthorityEnum.GuildEmblem) then UIManager.OpenView(Const_UI_Lua.UIEnum.UIGuildChangeFrame) self:CloseView() end elseif self.event_GuildNotice == comp then if self:CheckAuthority(MDL.Guild.AuthorityEnum.GuildNotice) then UIManager.OpenView(Const_UI_Lua.UIEnum.UIGuildPublicNotice,{text = self.context.notice, isNotice = true}) self:CloseView() end elseif self.event_RecruitNotice == comp then if self:CheckAuthority(MDL.Guild.AuthorityEnum.GuildAnnouncement) then UIManager.OpenView(Const_UI_Lua.UIEnum.UIGuildPublicNotice,{text = self.context.listInfo.recruitTagline}) self:CloseView() end elseif self.event_EditApp == comp then if self:CheckAuthority(MDL.Guild.AuthorityEnum.GuildGroup) then UIManager.OpenView(Const_UI_Lua.UIEnum.UIGuildEditorChatNumber) self:CloseView() end elseif self.UICommonPopUp.btn_Close == comp then self:CloseView() elseif self.event_PromptInfo == comp then -- 提示信息按钮 UIManager.OpenView(Const_UI_Lua.UIEnum.UIGuildNoticeSetting) self:CloseView() end end function UIGuildMainSetPanel:OnBackButtonPressed() self:OnButtonClicked(self.UICommonPopUp.btn_Close) end function UIGuildMainSetPanel:CheckAuthority(permission) if not MDL.Guild.JobHasPermission(MDL.Guild.GetMyGuildInfo().jobTitle,permission) then CTL.Sound.PlayGameSound("UI_invalid") CTL.Tips.AddTipsMsg(Const_IDS.IDS_Guild_CommonFail4) return false end return true end return UIGuildMainSetPanel