aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--examples/01-bitmap-display.lisp8
-rw-r--r--examples/02-moving-bitmp.lisp4
-rw-r--r--examples/03-font-render.lisp11
-rw-r--r--wheelwork.lisp2
4 files changed, 17 insertions, 8 deletions
diff --git a/examples/01-bitmap-display.lisp b/examples/01-bitmap-display.lisp
index 788ae6d..c9e0275 100644
--- a/examples/01-bitmap-display.lisp
+++ b/examples/01-bitmap-display.lisp
@@ -19,5 +19,9 @@
(defun start ()
- (ww::start (make-instance 'bitmap-display
- :asset-root #P"~/projects/wheelwork/examples/")))
+ (ww::start
+ (make-instance
+ 'bitmap-display
+ :asset-root (merge-pathnames
+ "examples/"
+ (asdf:system-source-directory :wheelwork)))))
diff --git a/examples/02-moving-bitmp.lisp b/examples/02-moving-bitmp.lisp
index 53a4f35..e656367 100644
--- a/examples/02-moving-bitmp.lisp
+++ b/examples/02-moving-bitmp.lisp
@@ -114,7 +114,9 @@
(ww::start (make-instance 'bitmap-display
:scale 2.0
:fps 30
- :asset-root #P"~/projects/wheelwork/examples/")))
+ :asset-root (merge-pathnames
+ "examples/"
+ (asdf:system-source-directory :wheelwork)))))
diff --git a/examples/03-font-render.lisp b/examples/03-font-render.lisp
index 3a3d659..fb43b08 100644
--- a/examples/03-font-render.lisp
+++ b/examples/03-font-render.lisp
@@ -1,6 +1,7 @@
(defpackage #:ww.examples/3
- (:use :cl))
+ (:use #:cl)
+ (:export #:start))
(in-package #:ww.examples/3)
@@ -25,14 +26,12 @@
(when (< 900 (ww::unit-x target))
(setf (ww::unit-x target)
-800))
- ;(incf (ww::unit-x target) 5)
- ))
+ (incf (ww::unit-x target) 5)))
(defmethod ww::boot ((app font-display))
(let ((hello
(make-instance
'ww::text
- ;:content "Yom"
:content "Hell! Oh World..."
:font (ww::get-asset "Ticketing.ttf" :asset-args '(:oversample 2)))))
@@ -61,7 +60,9 @@
:fps 60
:refocus-on-mousedown-p nil
:title "Wheelwork Example: Font display"
- :asset-root "~/projects/wheelwork/examples/")
+ :asset-root (merge-pathnames
+ "examples/"
+ (asdf:system-source-directory :wheelwork)))
:x 2380))
diff --git a/wheelwork.lisp b/wheelwork.lisp
index 5807f30..555366b 100644
--- a/wheelwork.lisp
+++ b/wheelwork.lisp
@@ -422,6 +422,8 @@ TARGET is FOCUSABLEP"
"EVENT-TYPE must be one of the slot value names for WHEELWORK::LISTENER."
(?> (unit) listener #$(slot-value $listener event-type)))
+
+
(defun eventloop-keydown (app sdl-keysym)
(let ((target (get-focus app)))
(when-let (handler (get-handler-for target 'keydown))