local UISyncTeamPVPSummary = UIViewClass() function UISyncTeamPVPSummary:OnOpened(context) if context.mvp then UIUtils.SetActive(self.img_BgMVP, true) UIUtils.SetImageByAssetBundle(self.img_BgMVP, context.ImgBg) if self.loc_Title.CurState == 0 then UIUtils.SetLocalizationImage(self.img_Title, context.ImgPath) else UIUtils.SetLabelText(self.lab_Title, Const_IDS[context.IDSPath]) end CTL.Sound.PlayGameSound("UI_mvp") UIUtils.SetActive( self.group_Summary, false) UIUtils.SetActive( self.group_BgMVP, true) else if self.loc_Title.CurState == 0 then UIUtils.SetLocalizationImage(self.img_Title, context.ImgPath) else UIUtils.SetLabelText(self.lab_Title, Const_IDS[context.IDSPath]) end self.UIState:SetState(context.state) UIUtils.SetActive( self.group_Summary, true) UIUtils.SetActive( self.group_BgMVP, false) self.txt_Score.text = "≥"..context.min end self:StartRepeatFunc(self.OnUpdateFun, 5) end function UISyncTeamPVPSummary:OnUpdateFun(deltaTime, timeSinceUpdate) self:CloseView() end function UISyncTeamPVPSummary:OnClosed() CTL.SyncTeamPVP.OnClosePvpSummary() end function UISyncTeamPVPSummary:OnButtonClicked(comp) if comp == self.btn_close then self:CloseView() end end return UISyncTeamPVPSummary