local UIHorseRearReward = require("View/HorseRear/UIHorseRearReward") local UIGodBeastActivityReward = UIViewClass(UIHorseRearReward) function UIGodBeastActivityReward:OnOpened(context) self:RegistSystemEvent(EventID.UI_OperationActivity_CloseView, self.OnCloseActivitySelf) self.activityId = context.activityId if Localization.IsAllChinese() then UIUtils.SetLocalizationImage(self.img_Title, "sywy_msz_01.png") end self:RefreshTabList() end function UIGodBeastActivityReward:RefreshTabList() if self.loop_FeedRewardTab.Count > 0 then self.loop_FeedRewardTab:ClearCells() end for i, v in MDL.OperationActivity.GodBeastEvent:GetEnumeratorByActivityID(self.activityId) do self.loop_FeedRewardTab:AddData(v, 0) end self.loop_FeedRewardTab:SelectIndex(0) end function UIGodBeastActivityReward:OnButtonClicked(comp) if comp == self.btn_Close then self:CloseView() else for i, v in ipairs(self.group_FixedItem) do if comp == v.event_Click then local eventData = MDL.OperationActivity.GodBeastEvent:GetDataByActivityID_EventID(self.activityId, self.eventId) local itemId = DataSheetManager.RewardClientShow:GetDataByClientShowID(eventData.NormalRewardShow).ItemID UTL.ItemTips.ShowCommonTipsById(itemId[i]) return end end end end function UIGodBeastActivityReward:OnCloseActivitySelf(viewClassPath, activityId) if viewClassPath == self.__viewClassPath then if self.activityId and activityId == self.activityId then self:CloseView(true) end end end return UIGodBeastActivityReward