summaryrefslogtreecommitdiff
path: root/basicWindow.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-19 00:34:15 -0600
committerJeff Carr <[email protected]>2024-01-19 00:34:15 -0600
commit99de2790d59a136e7b5f158d65965375b6c5e8f7 (patch)
tree6cede69073fa120b9a33b829ff26439e4314708b /basicWindow.go
parentcdeb6042fc879132349b3fc2faffedf48b8bdfb6 (diff)
show & hide tests
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'basicWindow.go')
-rw-r--r--basicWindow.go24
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
}