Beispiel #1
0
 def load(self):
     self.noNewsLabel = DirectLabel(parent = self, relief = None, text = TTLocalizer.NewsPageImportError, text_scale = 0.12)
     if HaveNewsFrame:
         if UseDirectNewsFrame:
             import datetime as datetime
             start = datetime.datetime.now()
             self.newsFrame = DirectNewsFrame.DirectNewsFrame(parent = self)
             ending = datetime.datetime.now()
             self.notify.info('time to load news = %s' % str(ending - start))
         else:
             self.newsFrame = InGameNewsFrame.InGameNewsFrame(parent = self)
             self.newsFrame.activate()
 def doNews(self, word, av, zoneId):
     args = word.split()
     response = None
     action = None
     if len(args) == 1:
         return
     action = args[1]
     if action == 'frame':
         NametagGlobals.setMasterArrowsOn(0)
         from toontown.shtiker import InGameNewsFrame
         base.newsFrame = InGameNewsFrame.InGameNewsFrame()
         base.newsFrame.activate()
         response = 'putting in game news direct frame up'
     elif action == 'snapshot':
         response = localAvatar.newsPage.doSnapshot()
     if response is not None:
         self.setMagicWordResponse(response)
     return