diff --git a/gui-example/main.go b/gui-example/main.go index e1caa6e..2b8cc39 100644 --- a/gui-example/main.go +++ b/gui-example/main.go @@ -29,7 +29,7 @@ func initGUI() { node := gui.NewWindow() node.AddDemoTab("A Simple Tab Demo") - node.AddAndlabsUiDemoTab("A Simple andlabs/ui Tab Demo") + node.AddDemoAndlabsUiTab("A Simple andlabs/ui Tab Demo") } // This demonstrates how to properly interact with the GUI diff --git a/window-debug.go b/window-debug.go index e87d0dc..61a7158 100644 --- a/window-debug.go +++ b/window-debug.go @@ -249,6 +249,17 @@ func makeWindowDebug() *ui.Box { } }) + n1 = addButton(vbox, "Node.DemoAndlabsUiTab") + n1.OnClicked(func(*ui.Button) { + y := nodeCombo.Selected() + log.Println("y =", y) + log.Println("nodeNames[y] =", nodeNames[y]) + node := Data.findId(nodeNames[y]) + if (node != nil) { + node.AddDemoAndlabsUiTab("ran gui.AddDemoAndlabsUiTab() " + strconv.Itoa(Config.counter)) + } + }) + /* ///////////////////////////////////////////////////// vbox = addGroup(hbox, "Numbers") diff --git a/window-demo-andlabs-ui.go b/window-demo-andlabs-ui.go index 2c1f6cb..806dc14 100644 --- a/window-demo-andlabs-ui.go +++ b/window-demo-andlabs-ui.go @@ -8,7 +8,7 @@ import _ "github.com/andlabs/ui/winmanifest" // calls to andlabs/ui. This can be used to bypass // the obvuscation added in this package if it is desired // or needed. -func (n *Node) AddAndlabsUiDemoTab(title string) { +func (n *Node) AddDemoAndlabsUiTab(title string) { newNode := n.AddTab(title, makeAndlabsUiTab()) if (Config.DebugNode) { newNode.Dump()