From 3c0e238cc7f3521d1a0a27e777b204f9c207b5ea Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 18 Jan 2024 16:41:16 -0600 Subject: [PATCH] make a go file so go get doesn't freak out Signed-off-by: Jeff Carr --- .gitignore | 1 + Makefile | 1 + main.go | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 main.go 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") + }) +}