local UICountryResetNoticePanel = UIViewClass() function UICountryResetNoticePanel:OnOpened(context) local countDown = MDL.Country.GetClosePrediction() CTL.Country.SetCdTime(self.lab_Time, countDown, Const_IDS.IDS_Common_Countdown) CTL.Country.SetTitleShow(self.titleTemplate) UIUtils.SetLabelText(self.UITemplateTitlePanel.lab_Title, Const_IDS.IDS_Country_LastWar) self.UITemplateTitlePanel.state_Title:SetState(1) end function UICountryResetNoticePanel:OnButtonClicked(comp) if comp == self.UITemplateTitlePanel.btn_close then self:CloseView() elseif comp == self.UITemplateTitlePanel.btn_Home then CTL.HomeMain.CloseViewBackHomeMain() elseif comp == self.UITemplateTitlePanel.btn_Info then UIManager.OpenView(Const_UI_Lua.UIEnum.UICommonNoteView, {id = LuaConst.NoteID.CountryOver}) elseif comp == self.btn_Rank then CTL.Rank.OpenRankPanelByType(MDL.Rank.RankType.Country) elseif comp == self.btn_Reward then UIManager.OpenView(Const_UI_Lua.UIEnum.UICountryResetRewardPreview) end end function UICountryResetNoticePanel:OnClosed() self.UITemplateTitlePanel.state_Title:SetState(0) end return UICountryResetNoticePanel