diff options
| author | Jeff Carr <[email protected]> | 2023-02-25 14:05:25 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-02-25 14:05:25 -0600 |
| commit | f3bb68396afa7452ecf1c8d4744c825a9d81057c (patch) | |
| tree | 00b55a17cee7a8e2f795c479a84a844779993c1c /cmds/buttonplugin/main.go | |
| parent | 355e5ec968427c2b07b78fec12224f31a65df740 (diff) | |
The debugging window is finally useful
the gui enabled debugging works
--gui-debug works from the command line
The debug window can now select things
debugging now includes widget types
all the debug flags work
finally working debugging flags via gui checkboxes
add debian packaging rules
use log() in the toolkit
use a standard log() to simplify debugging flags
add reference to 'GO Style Guide'
use the same LICENSE from the GO developers.
TODO: make this threadsafe
TODO: fix plugin stuff
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'cmds/buttonplugin/main.go')
| -rw-r--r-- | cmds/buttonplugin/main.go | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/cmds/buttonplugin/main.go b/cmds/buttonplugin/main.go index cdd8ef3..6132ed6 100644 --- a/cmds/buttonplugin/main.go +++ b/cmds/buttonplugin/main.go @@ -21,7 +21,7 @@ func main() { // gui.LoadToolkit("default") // panic("WTF gocui not happening") // gui.LoadToolkit("gocui") - gui.Init() +// gui.Init() // buttonWindow() go gui.Main(func () { @@ -57,6 +57,10 @@ func buttonWindow() { w = gui.NewWindow() g = w.NewGroup("buttonGroup") + g.NewButton("hello", func () { + log.Println("world") + }) + g.NewButton("NewButton()", func () { log.Println("new foobar 2. Adding button 'foobar 3'") name := "foobar " + strconv.Itoa(counter) @@ -73,8 +77,12 @@ func buttonWindow() { g.NewGroup(name) }) - g.NewButton("hello", func () { - log.Println("world") + g.NewButton("gui.DebugWindow()", func () { + gui.DebugWindow() + }) + + g.NewButton("gui.GolangDebugWindow()", func () { + gui.GolangDebugWindow() }) g.NewButton("LoadToolkit(andlabs)", func () { @@ -86,7 +94,8 @@ func buttonWindow() { }) g.NewButton("Init()", func () { - gui.Init() + log.Println("gui.Init() is deprecated(?)") + //gui.Init() }) g.NewButton("Main()", func () { |
