From a72024107be0c01375508d7ac732fc29a4bad8e7 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 27 Jan 2024 09:04:43 -0600 Subject: nocui works Signed-off-by: Jeff Carr --- choices.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'choices.go') diff --git a/choices.go b/choices.go index 753e135..7ca1865 100644 --- a/choices.go +++ b/choices.go @@ -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 } -- cgit v1.2.3