local UIEquipStarAttrLevelUp = UIViewClass() local equip_pb = require('Proto/equip_pb') function UIEquipStarAttrLevelUp:OnOpened(context) if context.opt == equip_pb.ESLevelUp then UIUtils.SetLabelText(self.UITemplatePopUpZero.txt_Title, Const_IDS.IDS_EquipStar_Tittle12) --升级成功 else UIUtils.SetLabelText(self.UITemplatePopUpZero.txt_Title, Const_IDS.IDS_EquipStar_Tips15) end local oldSkillData = DataSheetManager.EquipSkillLib:GetDataByEquipSkillID(context.oldSkillId) local newSkillData = DataSheetManager.EquipSkillLib:GetDataByEquipSkillID(context.newSkillId) UIUtils.SetLabelText(self.txt_AttrInfo1, Const_IDS[oldSkillData.EquipSkillDes]) UIUtils.SetImageByAssetBundle(self.img_AttrLevel1, oldSkillData.SkillLevelIcon) UIUtils.SetLabelText(self.txt_AttrInfo2, Const_IDS[newSkillData.EquipSkillDes]) UIUtils.SetImageByAssetBundle(self.img_AttrLevel2, newSkillData.SkillLevelIcon) local stage for i, v in DataSheetManager.EquipStarStage:GetEnumerator() do if v.EquipSkillLibID == newSkillData.EquipSkillLibID then stage = v.StarStage break end end local stageData = DataSheetManager.EquipStarStage:GetDataByStarStage(stage) self.txt_Num.text = stageData.LibStarLevel UIUtils.SetImageByAssetBundle(self.img_Star, stageData.Icon) end function UIEquipStarAttrLevelUp:OnButtonClicked(comp) if comp == self.UITemplatePopUpZero.Bottom then self:CloseView() end end return UIEquipStarAttrLevelUp