allow quitting with the esc key
This commit is contained in:
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user