aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/02-moving-bitmp.lisp7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/02-moving-bitmp.lisp b/examples/02-moving-bitmp.lisp
index 4706d1b..5d33de8 100644
--- a/examples/02-moving-bitmp.lisp
+++ b/examples/02-moving-bitmp.lisp
@@ -29,6 +29,10 @@
(ww::on-mousedown (unit x y clicks button)
(format t "~a was clicked at ~a,~a!~%" unit x y)))
+(ww::defhandler mouse-over
+ (ww::on-mousemotion (target x y xrel yrel state)
+ (print (list target x y xrel yrel state))))
+
(defmethod ww::boot ((app bitmap-display))
(let ((bm
(make-instance 'ww::bitmap
@@ -39,7 +43,8 @@
;; first
(ww::refocus-on bm)
(ww::set-handler bm #'move-thing)
- (ww::set-handler bm #'thing-clicked )
+ (ww::set-handler bm #'thing-clicked)
+ (ww::set-handler bm #'mouse-over)
(ww::add-unit app bm)
;;second
(setf (ww::unit-x bm2) 90