diff options
| author | Jeff Carr <[email protected]> | 2021-10-04 21:54:16 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-04 21:54:16 -0500 |
| commit | e5b4e184fc20e13e4744ea7b3a46d57055460864 (patch) | |
| tree | 2d83f56cfbf85e7b1d29505740b701258166894d /structs.go | |
| parent | b5b1528a29d42d01597cb15b317177ca2237e535 (diff) | |
TAB: more tab handling cleanups
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -124,7 +124,7 @@ func (s GuiBox) InitTab(title string) { s.Window.UiTab = tab } -func (s GuiBox) AddTab(title string) { +func (s GuiBox) AddTab(title string, custom ui.Control) { if (s.Window == nil) { return } @@ -134,7 +134,20 @@ func (s GuiBox) AddTab(title string) { tab := s.Window.UiTab - tab.Append(title, InitBlankWindow()) + tab.Append(title, custom) +} + +func (s GuiBox) AddDemoTab(title string) { + if (s.Window == nil) { + return + } + if (s.Window.UiTab == nil) { + return + } + + tab := s.Window.UiTab + + tab.Append(title, makeWindowTemplate()) } // Note: every mouse click is handled |
