2022-10-20 06:55:42 -05:00
|
|
|
package gui
|
|
|
|
|
|
|
|
func (n *Node) NewSpinner(name string, x int, y int) *Node {
|
2023-02-25 14:05:25 -06:00
|
|
|
newNode := n.New(name, "Spinner")
|
2022-11-13 08:53:03 -06:00
|
|
|
newNode.Widget.X = x
|
|
|
|
newNode.Widget.Y = y
|
2022-10-20 06:55:42 -05:00
|
|
|
|
2022-11-13 08:53:03 -06:00
|
|
|
newNode.Widget.Custom = func() {
|
2023-02-25 14:05:25 -06:00
|
|
|
log(debugGui, "even newer clicker() name in NewSpinner", newNode.Widget)
|
2022-11-13 08:53:03 -06:00
|
|
|
}
|
2022-10-21 11:40:08 -05:00
|
|
|
|
2022-11-13 08:53:03 -06:00
|
|
|
for _, aplug := range allPlugins {
|
2023-02-25 14:05:25 -06:00
|
|
|
log(debugGui, "gui.NewSpinner() aplug =", aplug.name, "name =", newNode.Widget.Name)
|
2022-11-13 08:53:03 -06:00
|
|
|
if (aplug.NewSpinner == nil) {
|
2023-02-25 14:05:25 -06:00
|
|
|
log(debugGui, "\tgui.NewSpinner() aplug.NewSpinner = nil", aplug.name)
|
2022-11-13 08:53:03 -06:00
|
|
|
continue
|
|
|
|
}
|
|
|
|
aplug.NewSpinner(&n.Widget, &newNode.Widget)
|
2022-10-21 11:40:08 -05:00
|
|
|
}
|
2022-10-20 06:55:42 -05:00
|
|
|
|
2022-11-13 08:53:03 -06:00
|
|
|
return newNode
|
2022-10-20 06:55:42 -05:00
|
|
|
}
|