allow quitting with the esc key
This commit is contained in:
parent
ec6dfc9ee4
commit
023ebd9432
@ -22,6 +22,9 @@ def main(windowed_mode):
|
||||
running = False
|
||||
if event.type == pygame.MOUSEBUTTONDOWN:
|
||||
running = False
|
||||
if event.type == pygame.KEYDOWN:
|
||||
if event.key == pygame.K_ESCAPE:
|
||||
running = False
|
||||
|
||||
pygame.display.flip()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user