From e1a8ca14ad02259ec8725b3b1c3914494eeb044f Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 4 Jun 2023 11:59:31 -0400 Subject: Quit when escape is pressed. --- super-bloom/game.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/super-bloom/game.scm b/super-bloom/game.scm index 11c19d1..ee288c5 100644 --- a/super-bloom/game.scm +++ b/super-bloom/game.scm @@ -244,7 +244,7 @@ (define-method (do-spray-water (mode )) (spray-water (player mode))) -(define-method (do-quit (mode )) +(define-method (do-quit (mode )) (exit-catbird)) (define-method (update (mode ) dt) @@ -307,6 +307,7 @@ (clear (parent mode)) (replace-major-mode (parent mode) (make ))) +(bind-input (key-press 'escape) do-quit) (bind-input (key-press 'z) do-reset) (define-class ()) @@ -335,6 +336,7 @@ (clear (parent mode)) (replace-major-mode (parent mode) (make ))) +(bind-input (key-press 'escape) do-quit) (bind-input (key-press 'z) do-reset) (define (reset-game!) -- cgit v1.2.3