2022-10-20 06:55:42 -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-05-09 08:38:33 -05:00
|
|
|
func (parent *Node) NewSpinner(name string, x int, y int) *Node {
|
|
|
|
newNode := parent.newNode(name, toolkit.Spinner, func() {
|
2023-03-23 12:35:12 -05:00
|
|
|
log(debugChange, "default NewSpinner() change", name)
|
2023-03-01 11:35:36 -06:00
|
|
|
})
|
2022-10-20 06:55:42 -05:00
|
|
|
|
2023-05-09 08:38:33 -05:00
|
|
|
newNode.X = x
|
|
|
|
newNode.Y = y
|
|
|
|
a := newAction(newNode, toolkit.Add)
|
2023-03-23 12:35:12 -05:00
|
|
|
a.X = x
|
|
|
|
a.Y = y
|
2023-05-09 08:38:33 -05:00
|
|
|
sendAction(a, newNode, parent)
|
|
|
|
|
2023-03-23 12:35:12 -05:00
|
|
|
|
2022-11-13 08:53:03 -06:00
|
|
|
return newNode
|
2022-10-20 06:55:42 -05:00
|
|
|
}
|