aboutsummaryrefslogtreecommitdiffhomepage
path: root/gui/button.lisp
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-12-10 07:11:02 -0800
committercolin <colin@cicadas.surf>2024-12-14 08:35:58 -0800
commit8a51ba81c7df6b0b6dab7cf4b35b5ca084b653ba (patch)
tree23f5f0a5449a06473aba2ec7914a3c2193823a10 /gui/button.lisp
parent2cbb8e4114c860e1774efd40d18661aee8ab2a72 (diff)
Replaced defclass-std with defrefactor-with-def
Diffstat (limited to 'gui/button.lisp')
-rw-r--r--gui/button.lisp23
1 files changed, 15 insertions, 8 deletions
diff --git a/gui/button.lisp b/gui/button.lisp
index b4a41e9..bebea08 100644
--- a/gui/button.lisp
+++ b/gui/button.lisp
@@ -2,14 +2,21 @@
(in-package #:wheelwork)
-(defclass/std button (unit interactive)
- ((up down :with
- :std (error "UP and DOWN lots are required")
- :doc "Any affine renderable unit")
- (bg :with)
- (on-press on-release :with :doc "Function accepting the button."))
- (:documentation "A basic button class. The UP and DOWN slots should
- be filled with renderable objects having the same size."))
+(def:class button (unit interactive)
+ ((up "Image when button is up")
+ (down "Image when button is down")
+ :required :prefix :type unit)
+ ((bg "optional background image")
+ :prefix
+ :type (or null unit)
+ :initform nil)
+ (on-press
+ on-release
+ :prefix
+ :type function
+ :documentation "Function accepting the BUTTON instance.")
+
+ :documentation "Basic button. UP and DOWN should be the same size.")
(defhandler button-released
(on-mouseup ()