aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/02-moving-bitmp.lisp10
-rw-r--r--examples/03-font-render.lisp8
2 files changed, 9 insertions, 9 deletions
diff --git a/examples/02-moving-bitmp.lisp b/examples/02-moving-bitmp.lisp
index bb6ae8f..7cb03d3 100644
--- a/examples/02-moving-bitmp.lisp
+++ b/examples/02-moving-bitmp.lisp
@@ -19,7 +19,7 @@
(:scancode-right (incf (ww::x target) ))
(:scancode-down (decf (ww::y target) ))
(:scancode-up (incf (ww::y target) ))
- (:scancode-w (incf (ww::unit-width target) 20))
+ (:scancode-w (incf (ww::width target) 20))
(:scancode-r (incf (ww::rotation target) (/ pi 3)))
(:scancode-l (decf (ww::rotation target) (/ pi 3)))
(:scancode-equals
@@ -44,10 +44,10 @@
(dx 0)
(dy 0))
(case scancode
- (:scancode-down (setf dy -1 desty (- ty (ww::unit-height target))))
- (:scancode-up (setf dy 1 desty (+ ty (ww::unit-height target))))
- (:scancode-left (setf dx -1 destx (- tx (ww::unit-width target))))
- (:scancode-right (setf dx 1 destx (+ tx (ww::unit-width target)))))
+ (:scancode-down (setf dy -1 desty (- ty (ww::height target))))
+ (:scancode-up (setf dy 1 desty (+ ty (ww::height target))))
+ (:scancode-left (setf dx -1 destx (- tx (ww::width target))))
+ (:scancode-right (setf dx 1 destx (+ tx (ww::width target)))))
(ww::add-handler
target
(ww::on-perframe ()
diff --git a/examples/03-font-render.lisp b/examples/03-font-render.lisp
index e36dc44..bdd1c6e 100644
--- a/examples/03-font-render.lisp
+++ b/examples/03-font-render.lisp
@@ -16,7 +16,7 @@
(format t "Pressed a key, changing the color~%")
(setf (ww::text-color target) (random-text-color))
- (with-accessors ((x ww::x) (y ww::y) (w ww::unit-width) (h ww::unit-height)) target
+ (with-accessors ((x ww::x) (y ww::y) (w ww::width) (h ww::height)) target
(format t "x:~a,y:~a,width:~a,height:~a~%" x y w h))))
(ww::defhandler marquee
@@ -61,8 +61,8 @@
(ww::scale-by hello 3.0)
(setf
- (ww::x hello) (* 0.5 (- 800 (ww::unit-width hello)))
- (ww::y hello) (* 0.5 (- 600 (ww::unit-height hello))))
+ (ww::x hello) (* 0.5 (- 800 (ww::width hello)))
+ (ww::y hello) (* 0.5 (- 600 (ww::height hello))))
(ww::add-handler hello #'marquee)
(ww::add-handler hello #'change-text-color)
(ww::add-handler hello #'twirl-on-click)
@@ -71,7 +71,7 @@
(ww::scale-by instructions 2.0)
(setf
- (ww::x instructions) (* 0.5 (- 800 (ww::unit-width instructions))))
+ (ww::x instructions) (* 0.5 (- 800 (ww::width instructions))))
(ww::add-unit app instructions)))