summaryrefslogtreecommitdiff
path: root/setText.go
diff options
context:
space:
mode:
Diffstat (limited to 'setText.go')
-rw-r--r--setText.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/setText.go b/setText.go
index a4ba556..3934fa3 100644
--- a/setText.go
+++ b/setText.go
@@ -5,12 +5,14 @@ package gui
import (
"errors"
+ "go.wit.com/lib/widget"
"go.wit.com/log"
- "go.wit.com/gui/widget"
)
func (n *Node) SetText(text string) *Node {
- if ! n.Ready() { return n }
+ if !n.Ready() {
+ return n
+ }
if n.String() == text {
// nothing changed
@@ -26,7 +28,9 @@ func (n *Node) SetText(text string) *Node {
}
func (n *Node) Set(val any) {
- if ! n.Ready() { return }
+ if !n.Ready() {
+ return
+ }
switch v := val.(type) {
case bool: