Esempio n. 1
0
    def peek(self, event):

        if pygame.event.peek():
            for event in pygame.event.get():
                #print("EVENT:  " + str(event))

                if event == pygame.QUIT:
                    self.fireEvent(guiquit("close"))
                if event.type == pygame.KEYUP:
                    if event.key == pygame.K_q:
                        self.fireEvent(guiquit("key"))
                elif event.type == pygame.VIDEORESIZE:
                    self.fireEvent(guiresize(event.w, event.h), "gui")
                elif event.type in (pygame.MOUSEBUTTONDOWN, pygame.MOUSEBUTTONUP, pygame.MOUSEMOTION):
                    self.fireEvent(mouseevent(event), "gui")
                elif event.type in (pygame.JOYAXISMOTION,
                                  pygame.JOYHATMOTION,
                                  pygame.JOYBUTTONDOWN,
                                  pygame.JOYBUTTONUP,
                                  pygame.JOYBALLMOTION):
                    self.fireEvent(joystickchange(event))
Esempio n. 2
0
    def started(self, *args):
        pygame.display.set_caption('AVIO Core')
        self.fireEvent(guiresize(self.screen_width, self.screen_height))

        Timer(self.delay, Event.create('repaint'), self.channel,
              persist=True).register(self)
Esempio n. 3
0
File: gui.py Progetto: ri0t/avio
    def started(self, *args):
        pygame.display.set_caption('AVIO Core')
        self.fireEvent(guiresize(self.screen_width, self.screen_height))

        Timer(self.delay, Event.create('repaint'), self.channel, persist=True).register(self)