summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-09 05:17:29 -0600
committerJeff Carr <[email protected]>2025-02-09 05:17:29 -0600
commiteb3b60abb6ccf8fb2731061bc856b3960d698683 (patch)
treea5cabce3364d4033413baaea8e56c92f79885dda /common.go
parent7260d0e8b275dba11aef0cba5048a435516c2b1e (diff)
block events for disable widgets
Diffstat (limited to 'common.go')
-rw-r--r--common.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/common.go b/common.go
index 1644ff2..0388ac6 100644
--- a/common.go
+++ b/common.go
@@ -62,6 +62,13 @@ func (n *Node) Hide() *Node {
return n
}
+func (n *Node) IsEnabled() bool {
+ if !n.Ready() {
+ return false
+ }
+ return n.enabled
+}
+
// enables a widget so the user can see it and work/click/etc on it
// by default, widgets are enabled when they are created
func (n *Node) Enable() *Node {