summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2021-10-27 11:18:22 -0500
committerJeff Carr <[email protected]>2021-10-27 11:18:22 -0500
commit10e13423db08e282a1f41c2f38f348d630cfca96 (patch)
tree3594d3dcd7ad55fc368fdb970012a21d56bb8a4b
parent356632ca5a51095149d8e2f1aea7efdc4917fc18 (diff)
REFACTOR: still trying to clean this up
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--gui-example/main.go2
-rw-r--r--window-debug.go11
-rw-r--r--window-demo-andlabs-ui.go2
3 files changed, 13 insertions, 2 deletions
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()