--[[ 灵识方案改名界面 ]]-- local UISkillPlanRenamePanel = UIViewClass() local hero_awaken_info = require 'Proto/hero_awaken_info_pb' function UISkillPlanRenamePanel:OnOpened(context) self.heroId = context.heroId self.planId = context.planId UIUtils.SetLabelText(self.UICommonPopUp.txt_Title, Const_IDS.IDS_HeroAwaken_FunctionName4) UIUtils.SetActive(self.group_NameChange, false) UIUtils.SetActive(self.event_Random, false) UIUtils.SetActive(self.group_Gender, false) UIUtils.SetLabelText(self.Placeholder, Const_IDS.IDS_PlayName_Hint2) end function UISkillPlanRenamePanel:OnButtonClicked(comp) if comp == self.btn_Sure then local tempName = self.obj_input.text if CTL.Name.IsNameLegal(tempName) then MDL.HeroAwaken.FairAwakenSkillPlanReq(self.heroId, hero_awaken_info.ChangeName, self.planId, nil, tempName) self:CloseView() end elseif comp == self.UICommonPopUp.btn_Close then self:CloseView() end end return UISkillPlanRenamePanel