Example #1
0
 def __call__(self, world, actor, interval):
     mouse = serge.engine.CurrentEngine().getMouse()
     if mouse.isClicked(serge.input.M_LEFT):
         for button in mouse.getActorsUnderMouse(world):
             self.log.info('button type:'+button.tag)
             if button.tag == 'list-item':
                 # join in a room
                 button.hightlight()
                 olctlhub.send(['join-room', int(button.name)])
             else:
                 if button.name == 'refresh':
                     olctlhub.send(['view-rooms'])
                     olctlhub.send(['my-room'])
                 elif button.name == 'new':
                     olctlhub.send(['new-room']
                         )
                     olctlhub.send(['view-rooms'])
                 elif button.name == 'start':
                     olctlhub.send(['start'])
                 elif button.name == 'practice':
                     mainscreen.main(0, None)
                 elif button.name == 'play-online':
                     waitingscreen.main()
                 elif button.name == 'inc':
                     button.control.inc()
                 elif button.name == 'dec':
                     button.control.dec()
Example #2
0
def main():
    #
    # register the resources
    registerGraphics()
    #
    # Create the engine
    engine = startEngine()
    #
    # Initialize the main logic
    # TODO
    # mainscreen.main(0)
    waitingscreen.main()
    #
    # Run the engine
    engine.run(G('framerate'))
Example #3
0
 def destroy(self, obj, arg):
     if self.isOLPlay == False:
         startscreen.main()
     elif self.isOLPlay == True:
         waitingscreen.main()