fixed esc not quitting application

This commit is contained in:
Nicholas Dyer 2023-02-20 00:18:42 -05:00
parent fba570e432
commit 4902d72ebc
No known key found for this signature in database
GPG Key ID: E4E6388793FA2105

View File

@ -78,6 +78,7 @@ class Surface(pygame.Surface):
self.quit = True self.quit = True
if event.type == pygame.KEYDOWN: if event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE: if event.key == pygame.K_ESCAPE:
self.running = False
self.quit = True self.quit = True
if event.type == pygame.MOUSEBUTTONDOWN: if event.type == pygame.MOUSEBUTTONDOWN:
self.mouse_handler.active = True self.mouse_handler.active = True