diff options
author | Colin Okay <colin@cicadas.surf> | 2022-07-06 09:51:13 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-07-06 09:51:13 -0500 |
commit | 76fa9bbd852fdb2d47c8cf3d539da805bd2f9b53 (patch) | |
tree | 0d4913bfd6a10bb175cdf497e152b80f958ce8fd /src/core | |
parent | 827dadbc91abdb8e2143c2a15b996e0e5ad87fc6 (diff) |
[bugfix] get-rect (container); [modify] contains-point-p
modification to contains-point-p in order to handle events on objects
in containers correctly; i.e. event doesn't fire if object is not
being drawn.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/container.lisp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/container.lisp b/src/core/container.lisp index 1410310..e5fe251 100644 --- a/src/core/container.lisp +++ b/src/core/container.lisp @@ -21,7 +21,7 @@ (with-slots (cached-rect left right top bottom) container (or cached-rect (setf cached-rect - (list* (vec:vec left bottom 0 1.0) + (list (vec:vec left bottom 0 1.0) (vec:vec left top 0 1.0) (vec:vec right top 0 1.0) (vec:vec right bottom 0 1.0) @@ -71,12 +71,11 @@ necessary." (gl:get* :scissor-box)) (scale (application-scale - (app-of-unit container)) - )) + (app-of-unit container)))) (with-slots (left right top bottom) container (gl:scissor (* left scale) (* scale bottom) (* scale (- right left)) (* scale (- top bottom))) (unwind-protect (dolist (u (container-units container)) - (when (visible-in-container-p u) + (if (visible-in-container-p u) (render u))) (gl:scissor (aref current 0) (aref current 1) (aref current 2) (aref current 3)))))) |