local UIKingChallengeRewardPopUp = UIViewClass() --三倍奖励只是从第三个奖励开始这里写死 local TrebleIndex = 2 function UIKingChallengeRewardPopUp:OnOpened() self.curBigSeasonId = MDL.KingChallenge.GetCurBigSeasonId() local bigSeasonCfg = DataSheetManager.KingChallengeSeason:GetDataByID(self.curBigSeasonId) local nameStr = UIUtils.GetLocalizedTxt(Const_IDS[bigSeasonCfg.SeasonName]) UIUtils.SetLabel(self.UICommonPopView.refer_Bg.txt_Title, string.FormatByIdsId(Const_IDS.IDS_KingChallenge_Hint6, nameStr)) UIUtils.SetActive(self.UICommonPopView.btn_1, false) UIUtils.SetActive(self.UICommonPopView.btn_2, false) local KingChallengeSpecialSeasonID = DataSheetManager.ConstData:GetDataByID("KingChallengeSpecialSeasonID").IntValue self.isTreble = self.curBigSeasonId == KingChallengeSpecialSeasonID self.group_reward:ReloadAll(bigSeasonCfg.Reward_Table) UIUtils.SetActive(self.Text_bg, self.isTreble) self.Text_Local.text = string.FormatByIdsId(Const_IDS["IDS_KingChallenge_Hint5"], CTL.KingChallenge.GetCurSeasonReachRewardCondition()) end function UIKingChallengeRewardPopUp:OnBackButtonPressed() self:OnButtonClicked(self.btn_Close) end function UIKingChallengeRewardPopUp:OnButtonClicked(com) if com == self.UICommonPopView.refer_Bg.btn_Close then self:CloseView() end end function UIKingChallengeRewardPopUp:OnCellInit(scrollRect, index, cellTable, data) if scrollRect == self.group_reward then UTL.Item.SetItemCell(cellTable.item, data.Item, data.ItemNum) UIUtils.SetActive(cellTable.img_greenUp, self.isTreble and TrebleIndex <= index) end end function UIKingChallengeRewardPopUp:OnCellClicked(scrollRect, index, cellTable, target, data) if scrollRect == self.group_reward then UTL.ItemTips.ShowCommonTipsById(data.Item) end end function UIKingChallengeRewardPopUp:OnClosed() UIUtils.SetActive(self.UICommonPopView.btn_1, true) UIUtils.SetActive(self.UICommonPopView.btn_2, true) end return UIKingChallengeRewardPopUp