From edceb19a33643419d0e367d36a7753fb68ede470 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 30 Oct 2021 17:11:28 -0500 Subject: NODE: still in the rabbit hole Signed-off-by: Jeff Carr --- structs.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'structs.go') diff --git a/structs.go b/structs.go index 23a5ca8..13dc2ea 100644 --- a/structs.go +++ b/structs.go @@ -125,23 +125,23 @@ type GuiBox struct { UiBox *ui.Box } -func (gb *GuiBox) Dump() { - log.Println("gui.GuiBox.Dump() Name = ", gb.Name) - log.Println("gui.GuiBox.Dump() Axis = ", gb.Axis) - log.Println("gui.GuiBox.Dump() GuiWindow = ", gb.Window) - log.Println("gui.GuiBox.Dump() node = ", gb.node) - log.Println("gui.GuiBox.Dump() UiBox = ", gb.UiBox) +func (b *GuiBox) Dump() { + log.Println("gui.GuiBox.Dump() Name = ", b.Name) + log.Println("gui.GuiBox.Dump() Axis = ", b.Axis) + log.Println("gui.GuiBox.Dump() GuiWindow = ", b.Window) + log.Println("gui.GuiBox.Dump() node = ", b.node) + log.Println("gui.GuiBox.Dump() UiBox = ", b.UiBox) } -func (s GuiBox) SetTitle(title string) { +func (b *GuiBox) SetTitle(title string) { log.Println("DID IT!", title) - if s.Window == nil { + if b.Window == nil { return } - if s.Window.UiWindow == nil { + if b.Window.UiWindow == nil { return } - s.Window.UiWindow.SetTitle(title) + b.Window.UiWindow.SetTitle(title) return } @@ -169,11 +169,12 @@ func (b *GuiBox) SetNode(n *Node) { } } -func (s GuiBox) Append(child ui.Control, x bool) { - if s.UiBox == nil { +func (b *GuiBox) Append(child ui.Control, x bool) { + if b.UiBox == nil { + panic("GuiBox.Append() can't work. UiBox == nil") return } - s.UiBox.Append(child, x) + b.UiBox.Append(child, x) } // Note: every mouse click is handled -- cgit v1.2.3