diff options
| author | Jeff Carr <[email protected]> | 2024-02-12 07:47:00 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-12 07:47:00 -0600 |
| commit | f2b66550181f2ba05c2e01353d874bbc26c02dd2 (patch) | |
| tree | 573d48c8752e71f77bdf279bdaaa454a61d94364 /main.go | |
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -0,0 +1,29 @@ +package main + +import ( + "go.wit.com/log" + "go.wit.com/gui" +) + +var myGui *gui.Node // This is the beginning of the binary tree of widgets + +// go will sit here until the window exits +func main() { + myGui = gui.New().Default() + myGui.LoadToolkit("nocui") + + buildworld() + gui.Watchdog() +} + +// This initializes the first window, a group and a button +func buildworld() { + window := myGui.NewWindow("build world") + + box := window.NewBox("vbox", false) + group := box.NewGroup("groupy") + grid := group.NewGrid("gridiron", 2, 1) + grid.NewButton("build", func() { + log.Println("make something to build everything") + }) +} |
