summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@member.fsf.org>2013-08-18 08:01:24 -0400
committerDavid Thompson <dthompson@member.fsf.org>2013-08-18 08:01:24 -0400
commite30c95377f4bf1bac3a97c45ecd849b3119fe2cd (patch)
treebdf9495ecf37414eaf5ccadc2dd227dc017b9f41
parent38e5866d32a355a7ef881e77650882aed5e32834 (diff)
Update font example.
-rw-r--r--examples/font.scm16
1 files changed, 14 insertions, 2 deletions
diff --git a/examples/font.scm b/examples/font.scm
index b6fd4a1..79a7743 100644
--- a/examples/font.scm
+++ b/examples/font.scm
@@ -1,4 +1,5 @@
-(use-modules (2d game-loop)
+(use-modules (2d color)
+ (2d game-loop)
(2d window)
(2d helpers)
(2d font))
@@ -22,7 +23,18 @@
;; Draw our sprite
(define (render)
(let ((fps (floor (inexact->exact (current-fps)))))
- (render-font font (format #f "FPS: ~d" fps) #f #f)))
+ (render-font font
+ (format #f "FPS: ~d" fps)
+ 0
+ 0
+ white
+ #f))
+ (render-font font
+ "Hello, world!"
+ 320
+ 300
+ green
+ #f))
;; Register callbacks.
(add-hook! on-quit-hook (lambda () (quit-demo)))