diff options
| author | Jeff Carr <[email protected]> | 2021-10-25 05:25:10 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-25 05:25:10 -0500 |
| commit | cbb777cb3dabee7fd7a9979bf4690a4ebf593666 (patch) | |
| tree | ec63d5e221cc53984cba38f3dcfb35e1a9c4e343 /window-debug.go | |
| parent | 4e5c26419d6c411ba04c57cb7b8062e73f695cec (diff) | |
EXAMPLE: correctly add a tab to the example app
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'window-debug.go')
| -rw-r--r-- | window-debug.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/window-debug.go b/window-debug.go index ef457aa..3afe8e3 100644 --- a/window-debug.go +++ b/window-debug.go @@ -356,15 +356,11 @@ func addButton(box *ui.Box, name string) *ui.Button { return button } -func (n *Node) AddDemoTab(title string) { - newNode := n.AddTab(title, makeWindowTemplate()) - newNode.Dump() - tabSetMargined(newNode.uiTab) -} - func (n *Node) AddDebugTab(title string) { newNode := n.AddTab(title, makeWindowDebug()) - newNode.Dump() + if (Config.DebugNode) { + newNode.Dump() + } tabSetMargined(newNode.uiTab) } @@ -372,10 +368,14 @@ func (n *Node) AddDebugTab(title string) { // // TODO: do proper tab tracking (will be complicated). low priority func tabSetMargined(tab *ui.Tab) { - log.Println("tabSetMargined() IGNORE THIS") + if (Config.DebugTabs) { + log.Println("tabSetMargined() IGNORE THIS") + } c := tab.NumPages() for i := 0; i < c; i++ { - log.Println("tabSetMargined() i =", i) + if (Config.DebugTabs) { + log.Println("tabSetMargined() i =", i) + } tab.SetMargined(i, true) } } |
