make a go file so go get doesn't freak out

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-18 16:41:16 -06:00
parent a33537c799
commit 3c0e238cc7
3 changed files with 32 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
*.swp
build
# ignore compiled plugins
*.so

View File

@ -1,6 +1,7 @@
.PHONY: debian nocui gocui andlabs
all: build debian
go build -o build main.go
build: nocui gocui andlabs

30
main.go Normal file
View File

@ -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")
})
}