new-gui/spinner.go

22 lines
380 B
Go
Raw Normal View History

package gui
import (
"git.wit.org/wit/gui/toolkit"
)
func (parent *Node) NewSpinner(name string, x int, y int) *Node {
newNode := parent.newNode(name, toolkit.Spinner, func() {
log(debugChange, "default NewSpinner() change", name)
})
newNode.X = x
newNode.Y = y
a := newAction(newNode, toolkit.Add)
a.X = x
a.Y = y
sendAction(a, newNode, parent)
return newNode
}