Exemplo n.º 1
0
    def handle_events(self, event):
        #Joypad Button down
        if event.type == USEREVENT+1:
            pass
        elif not keyActions(event, JOYSTICK_ACTIONS, KEYBOARD_ACTIONS, self.actions):
            #let the list handle the event
            self.list.handle_event(event)
            return

        self.__updateData()
        self.__updateButtons()
Exemplo n.º 2
0
 def __handle_events(self):
     """ 
     Handles the waiting events, if the key is not in the classes action
     list the event is forwarded to the active applet.
     """            
     for event in pygame.event.get():
         if event.type == QUIT or event.type == KEYDOWN and event.key == K_ESCAPE:
             pygame.event.clear()
             self.applets[0].exit()
             self.running = False
             break
         elif keyActions(event, JOYSTICK_ACTIONS, KEYBOARD_ACTIONS, self.actions):
             self.activeApplet= self.applets[self.activeAppletNumber]
         else:
             self.activeApplet.handle_events(event)
Exemplo n.º 3
0
 def handle_events(self, event):
     if not keyActions(event, JOYSTICK_ACTIONS, KEYBOARD_ACTIONS, self.actions):
         #let the list handle the event
         self.list.handle_event(event)
Exemplo n.º 4
0
 def handle_event(self, event):
     """
     Handle the event not handled by the GUI.
     """
     keyActions(event,JOYSTICK_ACTIONS, KEYBOARD_ACTIONS, self.actions)