Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
|
b2feffce92 | |
|
8c873d7ab2 |
5
args.go
5
args.go
|
@ -17,6 +17,7 @@ var argDebugger ArgsDebugger
|
|||
// This struct can be used with the go-arg package
|
||||
type ArgsDebugger struct {
|
||||
Debugger bool `arg:"--debugger" help:"open the debugger window"`
|
||||
Logger bool `arg:"--logger" help:"open the log.* control window"`
|
||||
}
|
||||
|
||||
// returns true if --gui-debug was passed from the command line
|
||||
|
@ -24,6 +25,10 @@ func ArgDebug() bool {
|
|||
return argDebugger.Debugger
|
||||
}
|
||||
|
||||
func ArgLogger() bool {
|
||||
return argDebugger.Logger
|
||||
}
|
||||
|
||||
func init() {
|
||||
arg.Register(&argDebugger)
|
||||
|
||||
|
|
6
main.go
6
main.go
|
@ -24,12 +24,8 @@ func DebugWindow() {
|
|||
|
||||
me.bugWin = gadgets.NewBasicWindow(me.treeRoot, "go.wit.com/gui debug window")
|
||||
me.bugWin.Make()
|
||||
me.bugWin.Draw()
|
||||
DebugWindow2(me.bugWin.Box(), "Debug Tab")
|
||||
|
||||
if ArgDebug() {
|
||||
log.SetTmp()
|
||||
}
|
||||
me.bugWin.Show()
|
||||
}
|
||||
|
||||
func DebugWindow2(newB *gui.Node, title string) *gui.Node {
|
||||
|
|
Loading…
Reference in New Issue