aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-07-06 11:34:53 -0500
committerColin Okay <colin@cicadas.surf>2022-07-06 11:34:53 -0500
commit73206ac142e34ce17195b1c3e538cf2e7a3f151d (patch)
treeef361d942a4059578de32cfafd8ff5dff9c80c25
parent581f46a901be48a8f4c56563577184ba1660bfae (diff)
[bugfix] in accessor generation for button
-rw-r--r--src/interactive/button.lisp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/interactive/button.lisp b/src/interactive/button.lisp
index 87779f0..08f7f37 100644
--- a/src/interactive/button.lisp
+++ b/src/interactive/button.lisp
@@ -72,8 +72,9 @@
collect
`(defmethod (setf ,accessor-name) (newval (button button))
(setf (,accessor-name (button-up button)) newval
- (,accessor-name (button-down button)) newval
- (,accessor-name (button-bg button)) newval)))))
+ (,accessor-name (button-down button)) newval)
+ (when (button-bg button)
+ (setf (,accessor-name (button-bg button)) newval))))))
`(progn ,@defs))))
(def-accessors x y scale-x scale-y width height rotation))