diff options
| author | Jeff Carr <[email protected]> | 2023-04-23 14:35:32 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-23 14:35:32 -0500 |
| commit | b3cd70c9a609cd00622a0df948d8f39b27f153af (patch) | |
| tree | ef0944bc2668bbec1285c9894315fd88bf228c42 | |
| parent | 890fe6740e7810e7eadd5cad21fefe2e99fd2d76 (diff) | |
andlabs: QueueMain() on add() + delay is _very_ stable
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | box.go | 19 | ||||
| -rw-r--r-- | grid.go | 14 |
2 files changed, 19 insertions, 14 deletions
@@ -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 +} @@ -37,17 +37,3 @@ func (n *Node) NewGrid(name string, w int, h int) *Node { 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 -} |
