go-gui-toolkits/main.go

30 lines
615 B
Go
Raw Normal View History

2024-02-12 07:47:00 -06:00
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()
2024-11-16 00:07:30 -06:00
// myGui.LoadToolkit("nocui")
2024-02-12 07:47:00 -06:00
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")
})
}