From 0410eda4a37a123c173f971d2050b41f79eb74fc Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 25 Jun 2013 18:18:25 -0400 Subject: Update examples to use new keycode enumeration. --- examples/simple.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'examples/simple.scm') diff --git a/examples/simple.scm b/examples/simple.scm index a988d25..dd09cb0 100644 --- a/examples/simple.scm +++ b/examples/simple.scm @@ -2,18 +2,17 @@ (figl gl) (2d sprite) (2d game-loop) - (2d window)) + (2d window) + (2d input) + (ice-9 format)) (define window-width 800) (define window-height 600) (define sprite #f) (define (key-down key) - (display key) (newline) - (case key - ;; Quit program when ESCAPE or Q is pressed. - ;; For now we have to use the SDL keycodes, but not for long! - ((SDLK_ESCAPE SDLK_q) + (cond ((or (= key (keycode escape)) + (= key (keycode q))) (close-window) (quit)))) -- cgit v1.2.3