local UIStratagemActivePopUp = UIViewClass() function UIStratagemActivePopUp:OnOpened(context) UIUtils.SetLabelText(self.UITemplatePopUpZero.txt_Title, Const_IDS.IDS_Stratagem_LearnSucceed) local levelId = context.Learn.CurrLvID local talentPoint = 0 for i, v in DataSheetManager.StratagemLearn:GetDataByID_LevelID_PointId(context.StratagemID, levelId) do talentPoint = talentPoint + v.TalentPoint end self.txt_ComprehensionPointNum.text = string.FormatByIdsId(Const_IDS.IDS_Stratagem_GetTalentPointTip, talentPoint) local maxLevel = 0 for i, v in DataSheetManager.StratagemLearn:GetDataByID_LevelID_PointId(context.StratagemID) do maxLevel = v.LevelID end if maxLevel == levelId then UIUtils.SetActive(self.group_Info, false) UIUtils.SetLabelText(self.txt_max, Const_IDS.IDS_Stratagem_LearnMaxLevel) else UIUtils.SetLabelText(self.txt_Before, Const_IDS["IDS_Type_EquipShow_" .. levelId]) UIUtils.SetLabelText(self.txt_After, Const_IDS["IDS_Type_EquipShow_" .. (levelId + 1)]) end local data = DataSheetManager.StratagemData:GetDataByID(context.StratagemID) self.txt_StratagemName.text = UTL.Color.FormatQualityText(UIUtils.GetLocalizedTxt(Const_IDS[data.StratagemName]), data.StratagemQuality) UIUtils.SetImageByAssetBundle(self.img_StratagemIcon, data.PicturePath) CTL.Sound.PlayGameSound("UI_breakout_03") end function UIStratagemActivePopUp:OnButtonClicked(comp) if comp == self.UITemplatePopUpZero.Bottom then self:CloseView() end end function UIStratagemActivePopUp:OnBackButtonPressed() self:OnButtonClicked(self.UITemplatePopUpZero.Bottom) end return UIStratagemActivePopUp