From 6f441738061b0528e86183402474ddb1cdf3c77a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 27 Apr 2023 12:55:11 -0500 Subject: andlabs: more cleanups Signed-off-by: Jeff Carr --- toolkit/andlabs/debug.go | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'toolkit/andlabs/debug.go') 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) + } +} -- cgit v1.2.3