andlabs: QueueMain() on add() + delay is _very_ stable

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-04-23 14:35:32 -05:00
parent 489f73496b
commit 67ee1513bf
2 changed files with 19 additions and 14 deletions

19
box.go Normal file
View File

@ -0,0 +1,19 @@
package gui
import (
"git.wit.org/wit/gui/toolkit"
)
func (n *Node) NewBox(name string, b bool) *Node {
newNode := n.newNode(name, toolkit.Box, nil)
newNode.B = b
var a toolkit.Action
a.ActionType = toolkit.Add
a.Name = name
a.Text = name
a.B = b
newaction(&a, newNode, n)
return newNode
}

14
grid.go
View File

@ -37,17 +37,3 @@ func (n *Node) NewGrid(name string, w int, h int) *Node {
return newNode return newNode
} }
func (n *Node) NewBox(name string, b bool) *Node {
newNode := n.newNode(name, toolkit.Box, nil)
newNode.B = b
var a toolkit.Action
a.ActionType = toolkit.Add
a.Name = name
a.Text = name
a.B = b
newaction(&a, newNode, n)
return newNode
}