2022-10-21 11:40:08 -05:00
|
|
|
package gui
|
|
|
|
|
2023-03-01 11:35:36 -06:00
|
|
|
import (
|
|
|
|
"git.wit.org/wit/gui/toolkit"
|
|
|
|
)
|
2022-10-21 11:40:08 -05:00
|
|
|
|
2023-03-01 11:35:36 -06:00
|
|
|
func (n *Node) NewTextbox(name string) *Node {
|
2023-04-08 11:06:50 -05:00
|
|
|
newNode := n.newNode(name, toolkit.Textbox, func() {
|
2023-03-23 12:35:12 -05:00
|
|
|
log(debugGui, "NewTextbox changed =", name)
|
2023-03-01 11:35:36 -06:00
|
|
|
})
|
2022-10-21 11:40:08 -05:00
|
|
|
|
2023-03-23 12:35:12 -05:00
|
|
|
var a toolkit.Action
|
2023-03-29 23:03:04 -05:00
|
|
|
a.ActionType = toolkit.Add
|
2023-04-03 16:32:01 -05:00
|
|
|
a.Name = name
|
|
|
|
a.Text = name
|
2023-03-23 12:35:12 -05:00
|
|
|
newaction(&a, newNode, n)
|
|
|
|
|
2022-11-13 08:53:03 -06:00
|
|
|
return newNode
|
2022-10-21 11:40:08 -05:00
|
|
|
}
|