diff --git a/.gitignore b/.gitignore index 6c5452f..f6742d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.swp +build # ignore compiled plugins *.so diff --git a/Makefile b/Makefile index a32f525..cc59329 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ .PHONY: debian nocui gocui andlabs all: build debian + go build -o build main.go build: nocui gocui andlabs diff --git a/main.go b/main.go new file mode 100644 index 0000000..0cb35d9 --- /dev/null +++ b/main.go @@ -0,0 +1,30 @@ +// make a simple app to build everything +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") + }) +}