local UISuperGoldBossSweepSuccess = UIViewClass() function UISuperGoldBossSweepSuccess:OnOpened(context) self.activityId = context.activityId self:RegistSystemEvent(EventID.UI_OperationActivity_CloseView, self.OnCloseActivitySelf) local result = context.result self.txt_Score.text = result.todayMaxScore UIUtils.SetLabel(self.UITemplatePopUpZero.txt_Title, UIUtils.GetLocalizedTxt(Const_IDS.IDS_SuperGoldHeroActivity_HeroTrial_ClickHint6)) for i, v in ipairs(result.reward) do self.loop_SweepReward:AddData(v, 0) end end function UISuperGoldBossSweepSuccess:OnCloseActivitySelf(viewClassPath, activityId) if viewClassPath == self.__viewClassPath then if self.activityId and activityId == self.activityId then self:CloseView() end end end function UISuperGoldBossSweepSuccess:OnBackButtonPressed() self:OnButtonClicked(self.UITemplatePopUpZero.Bottom) end function UISuperGoldBossSweepSuccess:OnButtonClicked(comp) if comp == self.UITemplatePopUpZero.Bottom then self:CloseView() end end function UISuperGoldBossSweepSuccess:OnCellInit(scrollRect, index, cellTable, data) if scrollRect == self.loop_SweepReward then UTL.Item.SetItemCell(cellTable.item, data.ItemId, data.ItemCount) end end function UISuperGoldBossSweepSuccess:OnCellClicked(scrollRect, index, cellTable, target, data) if scrollRect == self.loop_SweepReward then UTL.ItemTips.ShowCommonTipsById(data.ItemId) end end return UISuperGoldBossSweepSuccess