summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2013-10-23 23:12:59 -0400
committerDavid Thompson <dthompson2@worcester.edu>2013-10-23 23:12:59 -0400
commit698cc6d76de71a737f1d443001ca87a1faa42e4b (patch)
treef1faca2af9f5581d6c0261633ded0bfa4a2a4e65
parent2bcb34a9d4e03fa162c74ea9bf3844e8ac23c199 (diff)
Update font demo.
-rw-r--r--examples/font.scm20
1 files changed, 12 insertions, 8 deletions
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)