summaryrefslogtreecommitdiff
path: root/examples/nine-patch.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-12-13 17:52:15 -0500
committerDavid Thompson <dthompson2@worcester.edu>2018-12-13 20:53:29 -0500
commitfe89f847503573378180ddbe5e6badec18093c37 (patch)
tree33ef04eefee4b6c9da2dc3cb72629e9963dd7dad /examples/nine-patch.scm
parentda895821c9aa1f8ec63e2eb7e8d317040d9989d7 (diff)
render: font: Include a default font for convenience.
* data/fonts/good-neighbors.fnt: New file. * data/fonts/good-neighbors.png: New file. * data/CREDITS: New file. * examples/fonts/AUTHORS: Delete. * examples/fonts/good_neighbors_starling.png: Delete. * examples/fonts/good_neighbors_starling.xml: Delete. * Makefile.am (dist_pkgdata_DATA, fontsdir, dist_fonts_DATA): New variables. (EXTRA_DIST): Remove examples/fonts files. * chickadee/render/font.scm (draw-text): Make font an optional keyword argument. * doc/api.texi (Fonts): Document it. * examples/grid.scm: Update to use new draw-text API. * examples/nine-patch.scm: Ditto. * examples/text.scm: Ditto. squash! render: font: Include a default font for convenience.
Diffstat (limited to 'examples/nine-patch.scm')
-rw-r--r--examples/nine-patch.scm6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/nine-patch.scm b/examples/nine-patch.scm
index 7e0db1a..d20ba06 100644
--- a/examples/nine-patch.scm
+++ b/examples/nine-patch.scm
@@ -7,14 +7,12 @@
(chickadee sdl))
(define image #f)
-(define font #f)
(define (load)
- (set! image (load-image "images/dialog-box.png"))
- (set! font (load-font "fonts/good_neighbors_starling.xml")))
+ (set! image (load-image "images/dialog-box.png")))
(define (draw alpha)
(draw-nine-patch image (make-rect 192.0 192.0 256.0 96.0) #:margin 6)
- (draw-text font "I am error." #v(200.0 266.0)))
+ (draw-text "I am error." #v(200.0 266.0)))
(run-game/sdl #:load load #:draw draw)