parent
144c12a2cf
commit
225f5393fd
5
args.go
5
args.go
|
@ -17,6 +17,11 @@ type ArgsDebugger struct {
|
||||||
Debugger bool `arg:"--debugger" help:"open the debugger window"`
|
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() {
|
func init() {
|
||||||
arg.Register(&argDebugger)
|
arg.Register(&argDebugger)
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ func DebugWindow(p *gui.Node) {
|
||||||
bugWin.StandardClose()
|
bugWin.StandardClose()
|
||||||
bugTab = DebugWindow2(bugWin, "Debug Tab")
|
bugTab = DebugWindow2(bugWin, "Debug Tab")
|
||||||
bugTab.StandardClose()
|
bugTab.StandardClose()
|
||||||
if gui.ArgDebug() {
|
if ArgDebug() {
|
||||||
log.SetTmp()
|
log.SetTmp()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,15 +34,6 @@ func DebugWindow2(n *gui.Node, title string) *gui.Node {
|
||||||
//////////////////////// main debug things //////////////////////////////////
|
//////////////////////// main debug things //////////////////////////////////
|
||||||
gog = newB.NewGroup("Debugging Windows:")
|
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 () {
|
gog.NewButton("logging", func () {
|
||||||
DebugFlags(myGui)
|
DebugFlags(myGui)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue