

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

dataset/ETHPy150Open tobykurien/rpi_lcars/app/screens/authorize.py ScreenAuthorize.handleEvents/original