local UIGuildApplyManifestoPanel = UIViewClass() function UIGuildApplyManifestoPanel:OnOpened(context) UIUtils.SetLabelText(self.txt_LastWord01,Const_IDS.IDS_GuildApply_QuickTalk1) UIUtils.SetLabelText(self.txt_LastWord02,Const_IDS.IDS_GuildApply_QuickTalk2) UIUtils.SetLabelText(self.txt_LastWord03,Const_IDS.IDS_GuildApply_QuickTalk3) --logging.error(LTAG.ERROR, self.UICommonPopUp) UIUtils.SetLabelText(self.UICommonPopUp.txt_Title,Const_IDS.IDS_GuildApply_Title4) if not string.isNilOrEmpty(MDL.Guild.GetMyGuildInfo().approveTagline) then self.obj_InputField.text = MDL.Guild.GetMyGuildInfo().approveTagline end end function UIGuildApplyManifestoPanel:OnBackButtonPressed() self:OnButtonClicked(self.UICommonPopUp.btn_Close) end function UIGuildApplyManifestoPanel:OnButtonClicked(comp) if comp == self.btn_QuickTalk then self.obj_InputField.gameObject:SetActive(false) self.group_QuickTalkList.gameObject:SetActive(true) elseif comp == self.img_Button01 then self.obj_InputField.text = self.txt_LastWord01.text self.obj_InputField.gameObject:SetActive(true) self.group_QuickTalkList.gameObject:SetActive(false) elseif comp == self.img_Button02 then self.obj_InputField.text = self.txt_LastWord02.text self.obj_InputField.gameObject:SetActive(true) self.group_QuickTalkList.gameObject:SetActive(false) elseif comp == self.img_Button03 then self.obj_InputField.text = self.txt_LastWord03.text self.obj_InputField.gameObject:SetActive(true) self.group_QuickTalkList.gameObject:SetActive(false) elseif comp == self.btn_1 then if string.isNilOrEmpty(self.obj_InputField.text) then CTL.Sound.PlayGameSound("UI_invalid") CTL.Tips.AddTipsMsg(Const_IDS.IDS_PersonalAnnounce_EmptyText) else MDL.Guild.GuildSetupReq(MDL.Guild.GuildUpdateType.ApproveTagline,self.obj_InputField.text) if self.context then self.context.func(self.context.params) end self:CloseView() end elseif comp == self.UICommonPopUp.btn_Close then self:CloseView() end end function UIGuildApplyManifestoPanel:OnValueChanged(comp, value) if comp == self.obj_InputField then local length = DataSheetManager.ConstData:GetDataByID("PlayerIntroCharNumlimit").IntValue self.obj_InputField.text = UTL.String.CutStrByLength(self.obj_InputField.text, length) end end return UIGuildApplyManifestoPanel