summaryrefslogtreecommitdiff
path: root/debug.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2021-10-09 02:37:14 -0500
committerJeff Carr <[email protected]>2021-10-09 02:37:14 -0500
commit6630fe037016967cc0b246086077b0523da6d521 (patch)
treea900b171f735d5c1091a46000e6ec89cb982e1ee /debug.go
parent3204eb151f4bd38854df22c91ab7c5f4ab06951e (diff)
NODE: walking around in the rabbit hole
Diffstat (limited to 'debug.go')
-rw-r--r--debug.go34
1 files changed, 34 insertions, 0 deletions
diff --git a/debug.go b/debug.go
index dbdbc68..d5273e0 100644
--- a/debug.go
+++ b/debug.go
@@ -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)
}
}
+*/