diff options
Diffstat (limited to 'choices.go')
| -rw-r--r-- | choices.go | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -29,7 +29,7 @@ func newChoices(parent *gui.Node) *choices { c.grid.NewButton("hello", func() { log.Info("world") }) - c.grid.NewButton("show basic window", func() { + c.grid.NewButton("toggle basic window", func() { basicWindow.Toggle() }) c.grid.NewLabel("a label") @@ -64,7 +64,7 @@ func newChoices(parent *gui.Node) *choices { c.animal.AddText("polar bear") c.place = gadgets.NewBasicEntry(c.grid, "common favorite place") - c.place.Custom = func () { + c.place.Custom = func() { log.Info("now set to:", c.place.String()) if c.place == section1.place { section2.place.SetText(c.place.String()) @@ -75,6 +75,13 @@ func newChoices(parent *gui.Node) *choices { } c.place.SetText("coffee shop") + c.grid.NewButton("enable animals", func() { + c.animal.Enable() + }) + c.grid.NewButton("disable animals", func() { + c.animal.Disable() + }) + return c } |
