NODE: walking around in the rabbit hole
This commit is contained in:
parent
b3e00c173b
commit
9ea89ac01f
4
main.go
4
main.go
|
@ -36,7 +36,7 @@ func ExampleWindow() {
|
|||
window := box.Window
|
||||
log.Println("box =", box)
|
||||
log.Println("window =", window)
|
||||
box.AddDebugTab("jcarr Debug")
|
||||
// box.AddDebugTab("jcarr Debug")
|
||||
|
||||
window.UiWindow.Show()
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ func DebugWindow() {
|
|||
window := box.Window
|
||||
log.Println("box =", box)
|
||||
log.Println("window =", window)
|
||||
box.AddDebugTab("jcarr Debug")
|
||||
// box.AddDebugTab("jcarr Debug")
|
||||
|
||||
window.UiWindow.Show()
|
||||
}
|
||||
|
|
|
@ -90,6 +90,10 @@ func (n *Node) Dump() {
|
|||
}
|
||||
|
||||
|
||||
func (n *Node) SetBox(box *GuiBox) {
|
||||
n.box = box
|
||||
}
|
||||
|
||||
func (n *Node) SetName(name string) {
|
||||
// n.uiType.SetName(name)
|
||||
if (n.uiWindow != nil) {
|
||||
|
@ -208,6 +212,19 @@ func findByName(node *Node, name string) *Node {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (parent *Node) AddTabNode(title string, n *Node) *Node {
|
||||
// Ybox := gui.NewBox(box, gui.Yaxis, "Working Stuff")
|
||||
// var baseControl ui.Control
|
||||
// baseControl = Ybox.UiBox
|
||||
// return baseControl
|
||||
|
||||
parent.Dump()
|
||||
|
||||
newNode := parent.makeNode(title, 444, 400 + Config.counter)
|
||||
newNode.uiTab = parent.uiTab
|
||||
return newNode
|
||||
}
|
||||
|
||||
func (parent *Node) AddTab(title string, uiC ui.Control) *Node {
|
||||
if parent.uiWindow == nil {
|
||||
parent.Dump()
|
||||
|
|
10
structs.go
10
structs.go
|
@ -186,7 +186,7 @@ func (s GuiBox) Append(child ui.Control, x bool) {
|
|||
s.UiBox.Append(child, x)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
func (s *GuiBox) AddTab(title string, custom ui.Control) *ui.Tab {
|
||||
if s.Window == nil {
|
||||
return nil
|
||||
|
@ -199,6 +199,7 @@ func (s *GuiBox) AddTab(title string, custom ui.Control) *ui.Tab {
|
|||
tab.Append(title, custom)
|
||||
return tab
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
func (s GuiBox) AddBoxTab(title string) *GuiBox {
|
||||
|
@ -218,9 +219,10 @@ func (n *Node) AddDemoTab(title string) {
|
|||
tabSetMargined(newNode.uiTab)
|
||||
}
|
||||
|
||||
func (s GuiBox) AddDebugTab(title string) {
|
||||
uiTab := s.AddTab(title, makeWindowDebug())
|
||||
tabSetMargined(uiTab)
|
||||
func (n *Node) AddDebugTab(title string) {
|
||||
newNode := n.AddTab(title, makeWindowDebug())
|
||||
newNode.Dump()
|
||||
tabSetMargined(newNode.uiTab)
|
||||
}
|
||||
|
||||
func tabSetMargined(tab *ui.Tab) {
|
||||
|
|
Loading…
Reference in New Issue