diff --git a/steam_saver/surfaces/steam_screen.py b/steam_saver/surfaces/steam_screen.py index 7cd9c0b..0df0475 100644 --- a/steam_saver/surfaces/steam_screen.py +++ b/steam_saver/surfaces/steam_screen.py @@ -197,6 +197,11 @@ class Surface(pygame.Surface): # Stop the game when a user clicks anywhere on the screen. self.running = False self.quit = True + case pygame.KEYDOWN: + if event.key == pygame.K_ESCAPE: + # Also stop the game if the Escape key is pressed. + self.running = False + self.quit = True # Update positions and speeds of all sprites (in this case, just one logo sprite). self.all_sprites.update()