local UIHeroMatch1v1Reward = require("View/HeroMatch1v1/UIHeroMatch1v1Reward") local UIHeroMatch3v3Reward = UIViewClass(UIHeroMatch1v1Reward) local APPEARANCE_ID_1 = 10017 local APPEARANCE_ID_2 = 10018 function UIHeroMatch3v3Reward:InitPanel() self:RegistSystemEvent(EventID.UI_HeroMatch3v3_CloseView, self.OnBackButtonPressed) -- 赛程结束关闭界面 self:RegistSystemEvent(EventID.UI_HeroMatch3v3_RefreshInfo, self.RefreshPanel) -- 赛程结束关闭界面 self.appearanceID1 = APPEARANCE_ID_1 self.appearanceID2 = APPEARANCE_ID_2 self.clickedTabIndex = 0 self:RefreshPanel() self.state_3V3:SetState(1) end function UIHeroMatch3v3Reward:SetRewardItems(col, rewards) for i, v in ipairs(col) do if i <= #rewards then UIUtils.SetActive(v.gameObject, true) UTL.Item.SetItemCell(v, rewards[i].ItemID, rewards[i].ItemNum) else UIUtils.SetActive(v.gameObject, false) end end end function UIHeroMatch3v3Reward:SetMyRank() -- 设置我的排名 self.myRankDesc, self.myRank = CTL.HeroMatch3v3.GetMyCurRankInfoDesc() self.myMatchInfo = MDL.HeroMatch3v3.GetMyMatchInfo() UIUtils.SetLabel(self.txt_Rank, UIUtils.GetLocalizedTxt(Const_IDS["IDS_Chat_BestRank"])..self.myRankDesc) end function UIHeroMatch3v3Reward:ShowFilterRewards(data) UIUtils.SetActive(self.group_Reward02.gameObject, true) UIUtils.SetLabelText(self.txt_Title1, Const_IDS["IDS_HeroMatch3v3_WinNum"]) UIUtils.SetLabelText(self.txt_Title2, Const_IDS["IDS_HeroMatch3v3_GotAward"]) UIUtils.SetLabelText(self.lab_Info, Const_IDS["IDS_HeroMatch3v3_RewardTips"]) self.loop_HMReward:ReloadAll(CTL.HeroMatch3v3.GetRankRewardsDataByMatchTimeID(data.ID, true)) self.loop_HMReward:MoveIndex(0) end function UIHeroMatch3v3Reward:ShowRankRewards(data) UIUtils.SetActive(self.group_Reward02.gameObject, true) UIUtils.SetLabelText(self.txt_Title1, Const_IDS["IDS_HeroMatch3v3_WinNum2"]) UIUtils.SetLabelText(self.txt_Title2, Const_IDS["IDS_HeroMatch3v3_GotAward"]) UIUtils.SetLabelText(self.lab_Info, Const_IDS["IDS_HeroMatch3v3_GotAwardMail"]) self.loop_HMReward:ReloadAll(CTL.HeroMatch3v3.GetRankRewardsDataByMatchTimeID(data.ID)) self.loop_HMReward:MoveIndex(0) end function UIHeroMatch3v3Reward:GetRewardConfig(rewardId) return DataSheetManager.HeroMatch3v3RewardRepeat:GetDataByAttrRepeatID(rewardId).Item_Table end function UIHeroMatch3v3Reward:OnButtonClicked(comp) if comp == self.btn_PointReward then -- 商店跳转 UIManager.OpenView(Const_UI_Lua.UIEnum.UIHeroMatch3v3Store, nil, "HeroMatch1v1/UIHeroMatch1v1Store") else UIHeroMatch1v1Reward.OnButtonClicked(self, comp) end end return UIHeroMatch3v3Reward