2022-10-20 06:55:42 -05:00
|
|
|
package gui
|
|
|
|
|
2023-03-01 11:35:36 -06:00
|
|
|
import (
|
2024-01-03 18:15:54 -06:00
|
|
|
"go.wit.com/log"
|
2024-01-03 18:54:08 -06:00
|
|
|
"go.wit.com/gui/toolkits"
|
2023-03-01 11:35:36 -06:00
|
|
|
)
|
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 {
|
2023-05-09 20:25:37 -05:00
|
|
|
newNode := parent.newNode(name, toolkit.Spinner)
|
|
|
|
|
|
|
|
newNode.Custom = func() {
|
2024-01-03 18:15:54 -06:00
|
|
|
log.Info("default NewSpinner() change", name)
|
2023-05-09 20:25:37 -05:00
|
|
|
}
|
2022-10-20 06:55:42 -05:00
|
|
|
|
2023-05-09 08:38:33 -05:00
|
|
|
newNode.X = x
|
|
|
|
newNode.Y = y
|
2023-03-23 12:35:12 -05:00
|
|
|
|
2023-05-09 18:53:31 -05:00
|
|
|
a := newAction(newNode, toolkit.Add)
|
|
|
|
sendAction(a)
|
2022-11-13 08:53:03 -06:00
|
|
|
return newNode
|
2022-10-20 06:55:42 -05:00
|
|
|
}
|