diff options
-rw-r--r-- | starling/gui.scm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/starling/gui.scm b/starling/gui.scm index 256cfd7..4698923 100644 --- a/starling/gui.scm +++ b/starling/gui.scm @@ -41,6 +41,7 @@ current-theme <widget> apply-theme + enabled? focused? hover? left-pressed? @@ -126,6 +127,7 @@ (define current-theme (make-parameter #f)) (define-class <widget> (<node-2d>) + (enabled? #:accessor enabled? #:init-value #t #:watch? #t) (focused? #:accessor focused? #:init-value #f #:watch? #t) (hover? #:accessor hover? #:init-value #f #:watch? #t) (left-pressed? #:accessor left-pressed? #:init-value #f #:watch? #t) @@ -301,7 +303,8 @@ (define-method (pick-widget (scene <gui-scene>) p) (pick scene p (lambda (node) - (and (visible? node) + (and (enabled? node) + (visible? node) (is-a? node <widget>))))) (define-method (on-mouse-move (scene <gui-scene>) x y x-rel y-rel buttons) |