From 225f5393fd5ac2f6430e173e57994ce98a857af6 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 3 Jan 2024 13:25:47 -0600 Subject: [PATCH] move complete Signed-off-by: Jeff Carr --- args.go | 5 +++++ mainWindow.go | 11 +---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/args.go b/args.go index 670262d..5ff1f58 100644 --- a/args.go +++ b/args.go @@ -17,6 +17,11 @@ type ArgsDebugger struct { Debugger bool `arg:"--debugger" help:"open the debugger window"` } +// returns true if --gui-debug was passed from the command line +func ArgDebug() bool { + return argDebugger.Debugger +} + func init() { arg.Register(&argDebugger) diff --git a/mainWindow.go b/mainWindow.go index 00538d7..8f688c8 100644 --- a/mainWindow.go +++ b/mainWindow.go @@ -17,7 +17,7 @@ func DebugWindow(p *gui.Node) { bugWin.StandardClose() bugTab = DebugWindow2(bugWin, "Debug Tab") bugTab.StandardClose() - if gui.ArgDebug() { + if ArgDebug() { log.SetTmp() } } @@ -34,15 +34,6 @@ func DebugWindow2(n *gui.Node, title string) *gui.Node { //////////////////////// main debug things ////////////////////////////////// gog = newB.NewGroup("Debugging Windows:") - // generally useful debugging - cb := gog.NewCheckbox("Seperate windows") - cb.Custom = func() { - log.Log(BUG, "Custom() n.widget =", cb.Name, cb.B) - n.SetTabs(cb.B) - } - cb.Set(false) - n.SetTabs(false) - gog.NewButton("logging", func () { DebugFlags(myGui) })