local UIKingChallengeSeasonReview = UIViewClass() function UIKingChallengeSeasonReview:OnOpened() self.scroll_Activities:ReloadAll(MDL.KingChallenge.GetHistorySeasonInfo()) self.scroll_Activities:MoveEnd() UIUtils.SetLabelText(self.UICommonPopUp.txt_Title, Const_IDS.IDS_KingChallenge_Hint4) end function UIKingChallengeSeasonReview:OnBackButtonPressed() self:OnButtonClicked(self.UICommonPopUp.btn_Close) end function UIKingChallengeSeasonReview:OnButtonClicked(com) if com == self.UICommonPopUp.btn_Close then self:CloseView() end end function UIKingChallengeSeasonReview:OnCellInit(scrollRect, index, cellTable, data) if scrollRect == self.scroll_Activities then local bigSeasonCfg = DataSheetManager.KingChallengeSeason:GetDataByID(data.seasonId) UIUtils.SetLabelText(cellTable.lab_seasonname, Const_IDS[bigSeasonCfg.SeasonName]) UIUtils.SetImageByAssetBundle(cellTable.sprite_Activities, bigSeasonCfg.SeasonPic) local startTime = os.date(UTL.Time.FormatDateEnum.YMD, data.seasonStartTime) local endFuncTime = os.date(UTL.Time.FormatDateEnum.YMD, data.seasonEndTime) cellTable.lab_time.text = " "..startTime .. "-" .. endFuncTime local index local startLittleSeasonId = data.startFairSeason for i = 1, data.seasonLong do local littleSeasonId = startLittleSeasonId + i - 1 if CTL.KingChallenge.Is1v1ReachKing(littleSeasonId, data.successSoloSeasonIds) then UIUtils.SetActive(cellTable.group_tag_left[i].img_tag, true) UIUtils.SetActive(cellTable.group_tag_left[i].Img_tag_gray, false) else UIUtils.SetActive(cellTable.group_tag_left[i].img_tag, false) UIUtils.SetActive(cellTable.group_tag_left[i].Img_tag_gray, true) end if CTL.KingChallenge.Is3v3ReachKing(littleSeasonId, data.successTVTSeasonIds) then UIUtils.SetActive(cellTable.group_tag_right[i].img_tag, true) UIUtils.SetActive(cellTable.group_tag_right[i].Img_tag_gray, false) else --未达成置灰 UIUtils.SetActive(cellTable.group_tag_right[i].img_tag, false) UIUtils.SetActive(cellTable.group_tag_right[i].Img_tag_gray, true) end index = i end for i = index + 1, #cellTable.group_tag_left do UIUtils.SetActive(cellTable.group_tag_left[i].gameObject, false) UIUtils.SetActive(cellTable.group_tag_right[i].gameObject, false) end end end function UIKingChallengeSeasonReview:OnCellClicked(scrollRect, index, cellTable, target, data) if scrollRect == self.scroll_Activities then UIManager.OpenView(Const_UI_Lua.UIEnum.UIKingChallengeSeasonReviewdetails, data) end end return UIKingChallengeSeasonReview