local UIGoldenHeroBossSweepSuccess = UIViewClass() function UIGoldenHeroBossSweepSuccess:OnOpened(context) self.activityId = context.activityId self.result = context.sweepResult self:RegistSystemEvent(EventID.UI_OperationActivity_CloseView, self.OnCloseActivitySelf) UIUtils.SetLabelText(self.UITemplatePopUpZero.txt_Title, Const_IDS.IDS_GoldHeroActivity_SynergyBoss_Battle_Hint12) self.txt_Damage.text = self.result.damage local killScore = self.result.killScore self.txt_KillPoint.text = killScore UIUtils.SetActive(self.group_KillPoint, killScore ~= 0) self.txt_DamagePoint.text = self.result.score local heroAdd = self.result.heroAdd if heroAdd ~= 0 then local heroName = UIUtils.GetLocalizedTxt(Const_IDS[DataSheetManager.HeroNum:GetDataByID(self.result.heroId).NameIDS]) self.lab_HeroAdd.text = string.format(UIUtils.GetLocalizedTxt(Const_IDS.IDS_GoldHeroActivity_SynergyBoss_Battle_Hint6), heroName) self.txt_HeroAdd.text = heroAdd UIUtils.SetActive(self.group_HeroAdd, true) else UIUtils.SetActive(self.group_HeroAdd, false) end local heroType = MDL.GoldenHeroMain.GetHeroTypeByActivityId(self.result.activityId) local itemId = DataSheetManager.GoldHeroActivityModeData:GetDataByHeroType(heroType).BossCurrency local itemData = DataSheetManager.ItemData:GetDataByID(itemId) UIUtils.SetLabelText(self.txt_BossCurrencyName, Const_IDS[itemData.Name]) self.txt_BossCurrencyNum.text = self.result.currencyNum end function UIGoldenHeroBossSweepSuccess:OnCloseActivitySelf(viewClassPath, activityId) if viewClassPath == self.__viewClassPath then if self.activityId and activityId == self.activityId then self:CloseView() end end end function UIGoldenHeroBossSweepSuccess:OnButtonClicked(comp) if comp == self.UITemplatePopUpZero.Bottom then self:CloseView() end end return UIGoldenHeroBossSweepSuccess