diff options
| author | Jeff Carr <[email protected]> | 2021-10-28 06:27:27 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-28 06:27:27 -0500 |
| commit | 2b85dda8006adacc7b5b0c5594033226097e9214 (patch) | |
| tree | 4ac86c6880a82565460829c96e6a847ae2b63f16 /debug-window.go | |
| parent | ac1d35a358a4503cbced3f4f8411935d09b255b3 (diff) | |
NODES: indent output based on depth in node tree
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'debug-window.go')
| -rw-r--r-- | debug-window.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/debug-window.go b/debug-window.go index 278aafb..756ebac 100644 --- a/debug-window.go +++ b/debug-window.go @@ -14,17 +14,18 @@ var names = make([]string, 100) var nodeNames = make([]string, 100) func DebugWindow() { - Config.Title = "replace InitWindow()" + Config.Title = "DebugWindow()" node := NewWindow() node.AddDebugTab("WIT GUI Debug Tab") } // TODO: remove this crap // What does this actually do? -// It populates the nodeNames in a map. No, not a map, an array. What is the difference again? -func addNodeName(c *ui.Combobox, s string) { +// It populates the nodeNames in a map. No, not a map, an array. +// What is the difference again? (other than one being in order and a predefined length) +func addNodeName(c *ui.Combobox, s string, id string) { c.Append(s) - nodeNames[y] = s + nodeNames[y] = id y = y + 1 } @@ -153,14 +154,15 @@ func makeWindowDebug() *ui.Box { }) ///////////////////////////////////////////////////// - nodeBox := addGroup(hbox, "range Data.NodeMap") + nodeBox := addGroup(hbox, "Windows:") nodeCombo := ui.NewCombobox() for name, node := range Data.NodeMap { if (Config.Debug) { log.Println("range Data.NodeMap() name =", name) } - addNodeName(nodeCombo, node.id) + tmp := node.id + " (" + name + ")" + addNodeName(nodeCombo, tmp, node.id) } nodeCombo.SetSelected(0) |
