new-gui/spinner.go

24 lines
392 B
Go

package gui
import (
"go.wit.com/log"
"go.wit.com/gui/widget"
)
func (parent *Node) NewSpinner(name string, x int, y int) *Node {
newNode := parent.newNode(name, widget.Spinner)
newNode.Custom = func() {
log.Info("default NewSpinner() change", name)
}
newNode.X = x
newNode.Y = y
if ! newNode.hidden {
a := newAction(newNode, widget.Add)
sendAction(a)
}
return newNode
}