REFACTOR: still trying to clean this up

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2021-10-27 11:18:22 -05:00
parent 25de1c5cdb
commit 176cae3a80
3 changed files with 13 additions and 2 deletions

View File

@ -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

View File

@ -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")

View File

@ -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()