summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2013-07-21 22:38:49 -0400
committerDavid Thompson <dthompson2@worcester.edu>2013-07-21 22:38:49 -0400
commit5ba6eaff39f79ebd8c843b801fde7752e48aca26 (patch)
tree2c7a91c9703b7fe46df0c294a95375dfacb39e21
parentf499b39bf52fd70ea0b2a9543d5bd287e12085dd (diff)
Update simple demo.
-rw-r--r--examples/simple.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/simple.scm b/examples/simple.scm
index ad98548..bcc94b7 100644
--- a/examples/simple.scm
+++ b/examples/simple.scm
@@ -11,16 +11,20 @@
(define window-height 600)
(define sprite #f)
+(define (quit-demo)
+ (close-window)
+ (quit))
+
(define (key-down key mod unicode)
(cond ((any-equal? key 'escape 'q)
- (close-window)
- (quit))))
+ (quit-demo))))
;; Draw our sprite
(define (render)
(draw-sprite sprite))
;; Register callbacks.
+(set-quit-callback (lambda () (quit)))
(set-render-callback (lambda () (render)))
(set-key-down-callback (lambda (key mod unicode) (key-down key mod unicode)))