local UIHorseEquipAscend = UIViewClass() local LvStr1 = "%s/%s" function UIHorseEquipAscend:OnOpened(context) self.oldLimitLv = context.oldLimitLv self.curLimitLv = context.curLimitLv self.horseId = context.horseId self.armorInfo = MDL.HorseEquip.GetArmorInfo(self.horseId) UIUtils.SetLabelText(self.UITemplatePopUpZero.txt_Title, Const_IDS.IDS_HorseEquip_Hint_23) self:RefreshInfo() end function UIHorseEquipAscend:RefreshInfo() local str1 = string.format(LvStr1, self.armorInfo.level, self.oldLimitLv) self.txt_Before.text = string.FormatByIdsKey("IDS_HorseSoul_Button3", str1) local horseEquipEnhance1 = DataSheetManager.HorseEquipEnhance:GetDataByEnhanceLevel(self.oldLimitLv) UIUtils.SetImageByAssetBundle(self.img_Armor1, horseEquipEnhance1.Icon) local str2 = string.format(LvStr1, self.armorInfo.level, self.curLimitLv) self.txt_After.text = string.FormatByIdsKey("IDS_HorseSoul_Button3", str2) local horseEquipEnhance2 = DataSheetManager.HorseEquipEnhance:GetDataByEnhanceLevel(self.curLimitLv) UIUtils.SetImageByAssetBundle(self.img_Armor2, horseEquipEnhance2.Icon) self.txt_toplimit.text = string.FormatByIdsKey("IDS_HorseEquip_Hint_24", self.curLimitLv) end function UIHorseEquipAscend:OnButtonClicked(comp) if comp == self.UITemplatePopUpZero.Bottom then self:CloseView() end end return UIHorseEquipAscend