diff options
Diffstat (limited to 'basicWindow.go')
| -rw-r--r-- | basicWindow.go | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/basicWindow.go b/basicWindow.go index c763aad..220ef52 100644 --- a/basicWindow.go +++ b/basicWindow.go @@ -2,23 +2,39 @@ package main import ( - "go.wit.com/log" + "go.wit.com/gui" "go.wit.com/lib/gadgets" + "go.wit.com/log" ) +var apple *gui.Node + // This initializes the first window, a group and a button func makebasicWindow() *gadgets.BasicWindow { log.Warn("start basicWindow") basicWindow = gadgets.NewBasicWindow(myGui, "basic window test") basicWindow.Make() basicWindow.StandardClose() - basicWindow.Custom = func () { + basicWindow.Custom = func() { log.Warn("got to close") } box1 := basicWindow.Box() group1 := box1.NewGroup("choices") - group1.NewButton("hello", func() {}) - // basicWindow.Draw() + group1.NewButton("hide apple", func() { + apple.Hide() + }) + group1.NewButton("show apple", func() { + apple.Show() + }) + group1.NewButton("hide computers", func() { + computers.Hide() + }) + group1.NewButton("show computers", func() { + computers.Show() + }) + apple = group1.NewButton("apple", func() { + log.Info("is not a pear") + }) return basicWindow } |
