summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-12 07:47:00 -0600
committerJeff Carr <[email protected]>2024-02-12 07:47:00 -0600
commitf2b66550181f2ba05c2e01353d874bbc26c02dd2 (patch)
tree573d48c8752e71f77bdf279bdaaa454a61d94364 /main.go
Diffstat (limited to 'main.go')
-rw-r--r--main.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..9865f61
--- /dev/null
+++ b/main.go
@@ -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")
+ })
+}