local UICountrySetPanel = UIViewClass() function UICountrySetPanel:OnOpened(context) local id = MDL.Country.GetMyJobId() UIUtils.SetLabelText(self.UICommonPopUp.txt_Title, Const_IDS.IDS_Setting) end function UICountrySetPanel:OnButtonClicked(comp) if comp == self.event_Inform then self:ExecuteFunc(MDL.Country.AuthorityEnum.CountryMail, Const_UI_Lua.UIEnum.UICountryNoticePanel, nil, Const_UI_Lua.UIEnum.UIGuildNoticePanel) elseif comp == self.event_Title then self:ExecuteFunc(MDL.Country.AuthorityEnum.CountryTitle, Const_UI_Lua.UIEnum.UICountryRenamePanel) elseif comp == self.event_Notice then self:ExecuteFunc(MDL.Country.AuthorityEnum.CountryNotice, Const_UI_Lua.UIEnum.UICountryPublicNotice, { isNotice = true }, Const_UI_Lua.UIEnum.UIGuildPublicNotice) elseif comp == self.event_RecruitNotice then self:ExecuteFunc(MDL.Country.AuthorityEnum.CountryNotice, Const_UI_Lua.UIEnum.UICountryPublicNotice, { isNotice = false }, Const_UI_Lua.UIEnum.UIGuildPublicNotice) elseif comp == self.UICommonPopUp.btn_Close then self:CloseView() end end function UICountrySetPanel:ExecuteFunc(authorityEnum, view, content, prefabPath) local id = MDL.Country.GetMyJobId() if CTL.Country.ShowResetState() then elseif MDL.Country.JobHasPermission(id, authorityEnum) then UIManager.OpenView(view, content, prefabPath) self:CloseView() else CTL.Tips.AddTipsMsgAndPlaySound(Const_IDS.IDS_Guild_CommonFail4) end end return UICountrySetPanel