local UIGuildAuctionInfo = UIViewClass() local auction_base = require 'Proto.auction_base_pb' function UIGuildAuctionInfo:OnOpened(context) self:RegistSystemEvent(EventID.UI_GuildAuctionInfo_RefreshPanel, self.RefreshPanel) self:RefreshPanel(context) end function UIGuildAuctionInfo:RefreshPanel(auctionParams) if not auctionParams then return end if auctionParams.auctionType == auction_base.GuildWar or auctionParams.auctionType == auction_base.GuildBoss or auctionParams.auctionType == auction_base.Escort or auctionParams.auctionType == auction_base.FightThrone or auctionParams.auctionType == auction_base.GVE then UIUtils.SetActive(self.group_Guild, true) UIUtils.SetActive(self.group_World,false) UIUtils.SetActive(self.group_CrossServer, false) elseif auctionParams.auctionType == auction_base.World then UIUtils.SetActive(self.group_World, true) UIUtils.SetActive(self.group_Guild, false) UIUtils.SetActive(self.group_CrossServer, false) self:RefreshWorldPanel() elseif auctionParams.auctionType == auction_base.Cross then UIUtils.SetActive(self.group_World, false) UIUtils.SetActive(self.group_Guild, false) UIUtils.SetActive(self.group_CrossServer, true) self:RefreshCrossPanel() end end local TIME_ID = 1645 function UIGuildAuctionInfo:RefreshWorldPanel() local desc, timeStr = UTL.Time.GetDateDescAndTime({[1] = TIME_ID}) UIUtils.SetLabel(self.txt_WorldInfo, string.format(UIUtils.GetLocalizedTxt(Const_IDS["IDS_Auction_WorldAuctionIntro2"]), timeStr)) end local TIME_ID = 1645 function UIGuildAuctionInfo:RefreshCrossPanel() local desc, timeStr = UTL.Time.GetDateDescAndTime({[1] = TIME_ID}) UIUtils.SetLabel(self.txt_CrossInfo, string.format(UIUtils.GetLocalizedTxt(Const_IDS["IDS_Auction_CrossSeverAuctionIntro2"]), timeStr)) end return UIGuildAuctionInfo