NODE: continued work on implementing a node tree
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
dcdced47db
commit
387b7ead6e
5
debug.go
5
debug.go
|
@ -122,6 +122,11 @@ func DebugDataNodeMap() {
|
|||
log.Println("Dumping Data.NodeMap:")
|
||||
for name, node := range Data.NodeMap {
|
||||
log.Println("\tData.NodeMap name =", node.Width, node.Height, name)
|
||||
if (node.children == nil) {
|
||||
log.Println("\t\tNo children")
|
||||
} else {
|
||||
log.Println("\t\tHas children:", node.children)
|
||||
}
|
||||
// node.SetName("yahoo")
|
||||
// log.Println("\tData.NodeMap node =", node)
|
||||
}
|
||||
|
|
|
@ -129,9 +129,9 @@ func (n *Node) InitTab(title string, custom func() ui.Control) *Node {
|
|||
os.Exit(-1)
|
||||
}
|
||||
if n.box != nil {
|
||||
log.Println("gui.InitTab() ERROR box already exists")
|
||||
log.Println("gui.InitTab() ERROR box already exists title =", title)
|
||||
n.Dump()
|
||||
os.Exit(-1)
|
||||
// os.Exit(-1)
|
||||
}
|
||||
|
||||
tab := ui.NewTab()
|
||||
|
|
|
@ -132,10 +132,25 @@ func makeWindowDebug() ui.Control {
|
|||
DumpMap()
|
||||
})
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
vbox = addGroup(hbox, "Node Debug")
|
||||
|
||||
n1 := addButton(vbox, "DebugDataNodeMap()")
|
||||
n1.OnClicked(func(*ui.Button) {
|
||||
DebugDataNodeMap()
|
||||
})
|
||||
|
||||
n2 := addButton(vbox, "DebugNodeChildren()")
|
||||
n2.OnClicked(func(*ui.Button) {
|
||||
DebugNodeChildren()
|
||||
})
|
||||
|
||||
/*
|
||||
/////////////////////////////////////////////////////
|
||||
vbox = addGroup(hbox, "Numbers")
|
||||
pbar := ui.NewProgressBar()
|
||||
vbox.Append(pbar, false)
|
||||
*/
|
||||
|
||||
|
||||
return hbox
|
||||
|
|
|
@ -55,9 +55,9 @@ func InitWindow(gw *GuiWindow, name string, axis int) *GuiBox {
|
|||
|
||||
var box *GuiBox
|
||||
if gw == nil {
|
||||
box = mapWindow(nil, name, Config.Height, Config.Width)
|
||||
box = mapWindow(nil, name, Config.Width, Config.Height)
|
||||
} else {
|
||||
box = mapWindow(gw.UiWindow, name, Config.Height, Config.Width)
|
||||
box = mapWindow(gw.UiWindow, name, Config.Width, Config.Height)
|
||||
}
|
||||
|
||||
// box.Window = &newGuiWindow
|
||||
|
@ -66,7 +66,7 @@ func InitWindow(gw *GuiWindow, name string, axis int) *GuiBox {
|
|||
// This is the first window. One must create it here
|
||||
if gw == nil {
|
||||
log.Println("gui.initWindow() ADDING ui.NewWindow()")
|
||||
n := uiNewWindow(name, Config.Height, Config.Width)
|
||||
n := uiNewWindow(name, Config.Width, Config.Height)
|
||||
box.node = n
|
||||
if (n.box == nil) {
|
||||
n.box = box
|
||||
|
|
Loading…
Reference in New Issue