local UIHeroAwakenpopup = UIViewClass() local State_Title = 2 function UIHeroAwakenpopup:OnOpened(context) self.UICommonPopUp.img_state:SetState(context.state) if context.state == State_Title then local heroData = DataSheetManager.AwakenHeroNum:GetDataByID(context.heroId) local titleConfig = DataSheetManager.Title:GetDataByID(heroData.TitleID) CTL.Title.SetTitleShow(self.UICommonPopUp.titleTemplate, titleConfig) end end function UIHeroAwakenpopup:OnBackButtonPressed() self:OnButtonClicked(self.UICommonPopUp.btn_Close) end function UIHeroAwakenpopup:OnButtonClicked(comp) if comp == self.UICommonPopUp.btn_Close then self:CloseView() end end return UIHeroAwakenpopup