--[[ 宠物符文突破成功 ]]-- local UIPetRuneBreakSuccess = UIViewClass() function UIPetRuneBreakSuccess:OnOpened(context) CTL.Sound.PlayGameSound("UI_breakthrough_03") UIUtils.SetLabelText(self.UITemplatePopUpZero.txt_Title, Const_IDS.IDS_HeroAdvance_Advanced) self.txt_OldStar.text = string.FormatByIdsId(Const_IDS.IDS_Pet_RuneLevel, context.lastLevel) self.txt_NewStar.text = string.FormatByIdsId(Const_IDS.IDS_Pet_RuneLevel, context.newLevel) local index = 0 for i, v in ipairs(context.cfg.Attr_Table) do if v.IsBasic == true then index = index + 1 local item = self.group_Attrs[index] if item then local attrData = DataSheetManager.AttrData:GetDataByID(v.AttrType) local attrValue = attrData.IsPercentShow and UTL.Attr.FormatNumberToPercentage(v.AttrNum, 0) or v.AttrNum UIUtils.SetLabel(item, UIUtils.GetLocalizedTxt(Const_IDS[attrData.Name]) .. UTL.Color.FormatGreenColor("+" .. attrValue)) end end end UIUtils.SetActive(self.group_Skill, CTL.Pet.CompareRuneNum(context.newLevel, context.lastLevel)) UIUtils.SetLabelText(self.lab_Skill, Const_IDS.IDS_PetRune3) end function UIPetRuneBreakSuccess:OnButtonClicked(comp) if comp == self.UITemplatePopUpZero.Bottom then self:CloseView() end end return UIPetRuneBreakSuccess