aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-07-08 12:13:16 -0500
committerColin Okay <colin@cicadas.surf>2022-07-08 12:13:16 -0500
commit1cba62c355602528890ecf8f669f5362e4c4d9a7 (patch)
treed953fc00289048f61ea396b147c234dd548c0f0b /examples
parent8bf0e572ee084e6659f56b2fecd44a54e2775b6c (diff)
[add] [doc] README; [refactor] rendering of containers
Diffstat (limited to 'examples')
-rw-r--r--examples/02-moving-bitmp.lisp4
-rw-r--r--examples/08-pong.lisp11
2 files changed, 7 insertions, 8 deletions
diff --git a/examples/02-moving-bitmp.lisp b/examples/02-moving-bitmp.lisp
index bf05a7c..b07f1aa 100644
--- a/examples/02-moving-bitmp.lisp
+++ b/examples/02-moving-bitmp.lisp
@@ -125,8 +125,8 @@
(ww::add-handler bm2 #'look-away)
(ww::add-handler bm2 #'wheelie)
- (ww::add-unit app bm2)
- (ww::add-unit app bm)))
+ (ww::add-unit app bm)
+ (ww::add-unit app bm2)))
(defun start ()
diff --git a/examples/08-pong.lisp b/examples/08-pong.lisp
index 51de28d..6fc9faa 100644
--- a/examples/08-pong.lisp
+++ b/examples/08-pong.lisp
@@ -173,19 +173,18 @@ on which boundary VAL is outside of."
(defmethod ww::boot ((app solo-pong))
"Adds the intro text and sets up the start button handler."
(sdl2:hide-cursor)
- (ww::add-unit
- app
- (setf (intro-text app)
+ (let ((intro-text
(make-instance
- 'ww::text
+ 'ww:text
:content "Press any key to start"
:font (ww::get-asset "Ticketing.ttf")
:x 160
:y 300
:scale-x 3.0
:scale-y 3.0)))
-
- (ww::add-handler app #'press-to-start))
+ (setf (intro-text app) intro-text)
+ (ww:add-unit app intro-text))
+ (ww:add-handler app #'press-to-start))
(defun start ()
(ww::start