diff options
| author | Jeff Carr <[email protected]> | 2021-10-07 05:52:22 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-07 05:52:22 -0500 |
| commit | 3eac6beec4c3809b4696d63a252a34a6c6dc8ae1 (patch) | |
| tree | 9b5e5046a59607482418a44c3e6e128cb33a9ebe /new-structs.go | |
| parent | 44b56de98421262ca10c741737faafe056470255 (diff) | |
NODE: start passing *Node around
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'new-structs.go')
| -rw-r--r-- | new-structs.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/new-structs.go b/new-structs.go index 0fa326a..df25cae 100644 --- a/new-structs.go +++ b/new-structs.go @@ -15,13 +15,20 @@ type Node struct { Width int Height int - uiType *ui.Control children []*Node + + control *ui.Control + window *ui.Window } func (n Node) SetName(name string) { // n.uiType.SetName(name) - log.Println("n.uiType =", n.uiType) + if (n.window != nil) { + log.Println("node is a window. setting title =", name) + n.window.SetTitle(name) + return + } + log.Println("*ui.Control =", n.control) return } |
