diff options
| author | Jeff Carr <[email protected]> | 2021-10-06 14:32:07 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-06 14:32:07 -0500 |
| commit | 36e2c6d2e3c266f32325985e98c3776755fdd511 (patch) | |
| tree | 744496b2fb22c9c4ba51bfacb4195689e05e9036 /structs.go | |
| parent | 7c6fae3efea5e96ae8aad2a3171f42ab4e69b3b1 (diff) | |
REFACTOR: things are back to working as they were
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -122,7 +122,8 @@ func (s GuiBox) Append(child ui.Control, x bool) { s.UiBox.Append(child, x) } -func (w GuiWindow) InitBox(title string) *GuiBox { +/* +func (w GuiWindow) InitWindow(title string) *GuiBox { if w.UiWindow == nil { log.Println("gui.InitBox() THIS SHOULD NEVER HAPPEN. Window doesn't exist", w) return nil @@ -131,14 +132,15 @@ func (w GuiWindow) InitBox(title string) *GuiBox { w.UiWindow.SetChild(tab) w.UiWindow.SetMargined(true) - tab.Append(title, initBlankWindow()) + tab.Append(title, InitBlankWindow()) tab.SetMargined(0, true) w.UiTab = tab return nil } +*/ -func (s GuiBox) InitTab(title string) *ui.Tab { +func (s GuiBox) InitTab(title string, custom func() ui.Control) *ui.Tab { if s.Window == nil { return nil } @@ -151,7 +153,7 @@ func (s GuiBox) InitTab(title string) *ui.Tab { window.SetChild(tab) window.SetMargined(true) - tab.Append(title, initBlankWindow()) + tab.Append(title, custom()) tab.SetMargined(0, true) // tab.SetMargined(1, true) @@ -187,7 +189,7 @@ func (s GuiBox) AddTab2(title string, custom ui.Control) *ui.Tab { } func (s GuiBox) AddBoxTab(title string) *GuiBox { - uiTab := s.AddTab2(title, initBlankWindow()) + uiTab := s.AddTab2(title, InitBlankWindow()) tabSetMargined(uiTab) var box *GuiBox |
