use KEYUP instead of KEYDOWN because otherwise switching from beamer mode does not work

This commit is contained in:
Simon Pirkelmann 2021-09-06 00:22:58 +02:00
parent 8c544f8fcc
commit 57cd60de8c

View File

@ -371,7 +371,7 @@ class Game:
pygame.time.wait(1500) pygame.time.wait(1500)
self.state = 'reset' self.state = 'reset'
pygame.display.update() pygame.display.flip()
def process_inputs(self): def process_inputs(self):
# proceed events # proceed events
@ -400,7 +400,7 @@ class Game:
self.state = 'input' self.state = 'input'
elif self.state == 'input': elif self.state == 'input':
self.state = 'running' self.state = 'running'
elif event.type == pygame.KEYDOWN: elif event.type == pygame.KEYUP:
if event.key == pygame.K_x: if event.key == pygame.K_x:
if not self.beamer_mode: if not self.beamer_mode:
# switch to beamer mode # switch to beamer mode