summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-09-08 07:20:11 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-09-08 07:24:43 -0400
commit64869baaa000acc35a63862172d56cd5c65db573 (patch)
tree544995766df28781d8472c3083347296e6edf83a /examples
parentb63ce7f900ee6a4631eacd1db07b2c9c9be12780 (diff)
examples: path: Exit when Q key is pressed.
Diffstat (limited to 'examples')
-rw-r--r--examples/path.scm5
1 files changed, 5 insertions, 0 deletions
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)