diff options
Diffstat (limited to 'src/application.lisp')
-rw-r--r-- | src/application.lisp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/application.lisp b/src/application.lisp index d2da8ef..c4ad9b0 100644 --- a/src/application.lisp +++ b/src/application.lisp @@ -4,21 +4,31 @@ (defclass/std application (container interactive) - ((title :with :std "Wheelwork App") + ((title :with :ri :std "Wheelwork App") (asset-root :ri :std #P"./" :doc "Directory under which assets are stored.") (asset-classifiers :std '(("png" png) ("ttf" font)) :doc "ALIST of (EXT CLASS). EXT is a string, file estension. CLASS is a symbol, class name.") (assets :with :a :std (make-hash-table :test 'equal) :doc "maps asset names to asset instances.") - (scale :with :std 1.0) - (width height :with :std 800) + (scale :with :std 1.0 + :doc "Scale factor applied before all + rendering. Affects sizes of all object as well as the + coordinates of mouse events.") + (width height :with :std 800 :doc "Window dimensions in real pixels.") (projection :with :a :doc "The projection matrix for the scene. Orthographic by default.") (window :with :a) - (refocus-on-mousedown-p :std t) + (refocus-on-mousedown-p + :std t + :doc "When T, clicking on a visible object will set the + application focus to that object.") (focus last-motion-target :with :a) (fps :std 30 :doc "Frames Per Second") - (frame-wait :r))) + (frame-wait :r)) + (:documentation "The application contains the information and data + structures necessary for creating a window, adding display units to + it, handling events, and loading resources. You should sublcass + this and write your own BOOT method.")) (defun can-set-projection-p (app) (and (slot-boundp app 'width) @@ -38,8 +48,9 @@ left 0 bottom 0 top (/ height scale) - right (/ width scale) - ))) + right (/ width scale)))) + + (defun fire-blur-event-on (thing) (when-let (blur-handlers (and thing (get-handlers-for thing 'blur))) |