diff options
| author | Jeff Carr <[email protected]> | 2021-10-09 02:37:14 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-09 02:37:14 -0500 |
| commit | 6630fe037016967cc0b246086077b0523da6d521 (patch) | |
| tree | a900b171f735d5c1091a46000e6ec89cb982e1ee /debug.go | |
| parent | 3204eb151f4bd38854df22c91ab7c5f4ab06951e (diff) | |
NODE: walking around in the rabbit hole
Diffstat (limited to 'debug.go')
| -rw-r--r-- | debug.go | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -171,6 +171,39 @@ func FindNode(name string) *Node { return nil } +func (dn *GuiData) ListChildren(dump bool) { + if Data.NodeMap == nil { + log.Println("Data.NodeMap == nil") + return + } + log.Println("Dumping Data.NodeMap:") + for name, node := range Data.NodeMap { + log.Println("\tData.NodeMap name =", node.id, node.Width, node.Height, name) + if (dump == true) { + node.Dump() + } + node.ListChildren(dump) + } +} + +func (dn *GuiData) findId(id string) *Node { + if Data.NodeMap == nil { + log.Println("Data.NodeMap == nil") + return nil + } + log.Println("Dumping Data.NodeMap:") + for name, node := range Data.NodeMap { + log.Println("\tData.NodeMap name =", node.id, node.Width, node.Height, name) + if (id == node.id) { + return node + } + // TODO: fix // Oct 9 + // node.findId(id) + } + return nil +} + +/* func DebugNodeChildren() { if Data.NodeMap == nil { log.Println("Data.NodeMap == nil") @@ -185,3 +218,4 @@ func DebugNodeChildren() { // log.Println("\tData.NodeMap node =", node) } } +*/ |
