From 698cc6d76de71a737f1d443001ca87a1faa42e4b Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 23 Oct 2013 23:12:59 -0400 Subject: Update font demo. --- examples/font.scm | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'examples') diff --git a/examples/font.scm b/examples/font.scm index aed6131..070da2d 100644 --- a/examples/font.scm +++ b/examples/font.scm @@ -3,6 +3,9 @@ (2d color) (2d font) (2d game) + (2d game-loop) + (2d scene) + (2d stage) (2d vector2)) (define (demo-textbox) @@ -13,13 +16,14 @@ 'left 200)) -(define-scene demo - #:title "Demo" - #:draw (lambda (textbox) (draw-textbox textbox)) - #:state (demo-textbox)) +(define demo-scene + (make-scene + #:init (lambda () (stage-define textbox (demo-textbox))) + #:draw (lambda () (draw-textbox (stage-ref textbox))))) -(define-game fonts - #:title "Fonts" - #:first-scene demo) +(define fonts-demo + (make-game + #:title "Fonts" + #:first-scene demo-scene)) -(run-game fonts) +(run-game fonts-demo) -- cgit v1.2.3