summaryrefslogtreecommitdiff
path: root/new-structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2021-10-31 05:19:51 -0500
committerJeff Carr <[email protected]>2021-10-31 05:19:51 -0500
commitfe6a625b30caec96a1be12009da7c9dbd5f8d3ff (patch)
tree80a3c00ab313cfd807890c88f12c3dd6b68c7c7b /new-structs.go
parentdac31511e9abc416c6b056c2d3579f38d70299ef (diff)
NODE: switch more around
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'new-structs.go')
-rw-r--r--new-structs.go27
1 files changed, 1 insertions, 26 deletions
diff --git a/new-structs.go b/new-structs.go
index 9e1ae3d..8c1f300 100644
--- a/new-structs.go
+++ b/new-structs.go
@@ -3,7 +3,7 @@ package gui
import (
"log"
"fmt"
- "reflect"
+// "reflect"
// "github.com/davecgh/go-spew/spew"
@@ -124,30 +124,6 @@ func (n *Node) Append(child *Node) {
// time.Sleep(3 * time.Second)
}
-func (n *Node) AddButton(name string, custom func(*Node)) *Node {
- if (n.uiBox == nil) {
- log.Println("gui.Node.AppendButton() filed node.UiBox == nil")
- return n
- }
- button := ui.NewButton(name)
- log.Println("reflect.TypeOF(uiBox) =", reflect.TypeOf(n.uiBox))
- log.Println("reflect.TypeOF(uiButton) =", reflect.TypeOf(button))
- n.uiBox.Append(button, false)
- n.uiButton = button
-
- newNode := n.makeNode(name, 888, 888 + Config.counter)
- newNode.uiButton = button
- newNode.custom = custom
-
- button.OnClicked(func(*ui.Button) {
- log.Println("gui.AppendButton() Button Clicked. Running custom()")
- custom(newNode)
- })
- // panic("AppendButton")
- // time.Sleep(3 * time.Second)
- return newNode
-}
-
func (n *Node) List() {
findByIdDFS(n, "test")
}
@@ -254,7 +230,6 @@ func (n *Node) AddTabNode(title string, b *GuiBox) *Node {
return newNode
}
-// func (parent *Node) AddTab(title string, uiC ui.Control) *Node {
func (n *Node) AddTab(title string, uiC *ui.Box) *Node {
parent := n
log.Println("gui.Node.AddTab() START name =", title)