summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)