local UIHeroMatch3v3TeamInfo = UIViewClass() function UIHeroMatch3v3TeamInfo:OnOpened(context) self.txt_TeamName.text = context.teamName self.loop_Match3v3TeamPlayer:ReloadAll(context.members) end function UIHeroMatch3v3TeamInfo:OnCellInit(scrollRect, index, cellTable, data) UIUtils.SetActive(cellTable.img_Captain, index == 0) local showInfo = data.playerShowInfo -- 设置头像 CTL.Character.SetPortraitAndFrame(cellTable.UIHeroHead190, showInfo.PortraitId, showInfo.FrameId) UIUtils.SetCanvasSortingOrderByMainCanvas(cellTable.UIHeroHead190.effectUpCanvas, cellTable.canvas, CTL.Character.UpOrder.Common) -- 名字 local officialDesc = showInfo.OfficialId > 0 and CTL.OfficialPosition.GetModelNameShow(showInfo.OfficialId) or "" UIUtils.SetLabel(cellTable.txt_PlayerName, officialDesc .. showInfo.name) -- 势力徽记 CTL.Guild.SetGuildEmblem(cellTable.img_Guild, cellTable.txt_Guild, showInfo.EmblemFrame, showInfo.EmblemContent) -- 战力 self:SetNumCE(cellTable, showInfo) end function UIHeroMatch3v3TeamInfo:SetNumCE(cellTable, showInfo) UIUtils.SetLabel(cellTable.txt_NumCE, showInfo.gsSum) end function UIHeroMatch3v3TeamInfo:OnCellClicked(scrollRect, index, cellTable, target, data) if target == cellTable.UIHeroHead190.img_PlayerAvatarBg then CTL.PlayerInteract.OpenFriendInteractView(data.memberId) end end function UIHeroMatch3v3TeamInfo:OnButtonClicked(comp) if comp == self.TipWindow then self:CloseView() end end return UIHeroMatch3v3TeamInfo