示例#1
0
    def handleEvents(self, event, fpsClock):
        LcarsScreen.handleEvents(self, event, fpsClock)
        
        if event.type == pygame.MOUSEBUTTONDOWN:
            self.beep1.play()

        if event.type == pygame.MOUSEBUTTONUP:
            return False
示例#2
0
    def handleEvents(self, event, fpsClock):
        LcarsScreen.handleEvents(self, event, fpsClock)

        if event.type == pygame.MOUSEBUTTONDOWN:
            if (self.attempts > 1):
                self.granted = True
                self.sound_beep1.play()
            else:
                if self.attempts == 0: self.sound_deny1.play()
                else: self.sound_deny2.play()
                self.granted = False
                self.attempts += 1

        if event.type == pygame.MOUSEBUTTONUP:
            if (self.granted):
                self.sound_granted.play()
                from screens.main import ScreenMain
                self.loadScreen(ScreenMain())
            else:
                self.sound_denied.play()
        

        return False
示例#3
0
 def update(self, fpsClock):
     if pygame.time.get_ticks() - self.lastClockUpdate > 1000:
         self.stardate.setText("STAR DATE {}".format(datetime.now().strftime("%d%m.%y %H:%M:%S")))
         self.lastClockUpdate = pygame.time.get_ticks()
     LcarsScreen.update(self, fpsClock)