From 64869baaa000acc35a63862172d56cd5c65db573 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 8 Sep 2021 07:20:11 -0400 Subject: examples: path: Exit when Q key is pressed. --- examples/path.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/path.scm b/examples/path.scm index 7bad91b..aabfb4d 100644 --- a/examples/path.scm +++ b/examples/path.scm @@ -74,7 +74,12 @@ (define (update dt) (update-agenda 1)) +(define (key-press key modifiers repeat?) + (case key + ((q) (abort-game)))) + (run-game #:window-title "Vector paths" #:load load #:draw draw + #:key-press key-press #:update update) -- cgit v1.2.3