diff options
Diffstat (limited to 'toolkit/andlabs/debug.go')
| -rw-r--r-- | toolkit/andlabs/debug.go | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/toolkit/andlabs/debug.go b/toolkit/andlabs/debug.go index 5ecd1fc..cc32b71 100644 --- a/toolkit/andlabs/debug.go +++ b/toolkit/andlabs/debug.go @@ -1,6 +1,6 @@ package main -// import "git.wit.org/wit/gui/toolkit" +import "git.wit.org/wit/gui/toolkit" var defaultBehavior bool = true @@ -50,7 +50,7 @@ func (t *andlabsT) Dump(b bool) { if ! b { return } - log(b, "Name = ", t.Name, t.Width, t.Height) + log(b, "Name = ", t.Width, t.Height) if (t.uiBox != nil) { log(b, "uiBox =", t.uiBox) } @@ -88,3 +88,25 @@ func GetDebugToolkit () bool { return debugToolkit } */ + +func flag(a *toolkit.Action) { + // should set the checkbox to this value + switch a.S { + case "Toolkit": + debugToolkit = a.B + case "Change": + debugChange = a.B + case "Plugin": + debugPlugin = a.B + case "Flags": + debugFlags = a.B + case "Error": + debugError = a.B + case "Now": + debugNow = a.B + case "Show": + ShowDebug() + default: + log(debugError, "Can't set unknown flag", a.S) + } +} |
