simple hello world app
This commit is contained in:
parent
0d6e4271e8
commit
8af3f2e105
4
main.go
4
main.go
|
@ -11,6 +11,7 @@ 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")
|
||||
|
||||
helloworld()
|
||||
gui.Watchdog()
|
||||
|
@ -20,7 +21,8 @@ func main() {
|
|||
func helloworld() {
|
||||
window := myGui.NewWindow("hello world")
|
||||
|
||||
group := window.NewGroup("foo bar")
|
||||
box := window.NewBox("bw vbox", false)
|
||||
group := box.NewGroup("foo bar")
|
||||
group.NewButton("hello", func() {
|
||||
log.Println("world")
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue