summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
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 {