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()
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)
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)
def handle_event(self, event): """ Handle the event not handled by the GUI. """ keyActions(event,JOYSTICK_ACTIONS, KEYBOARD_ACTIONS, self.actions)