2022-10-16 08:07:13 -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-05 13:18:44 -06:00
|
|
|
"go.wit.com/gui/widget"
|
2023-03-01 11:35:36 -06:00
|
|
|
)
|
2022-10-16 08:07:13 -05:00
|
|
|
|
2023-05-09 08:38:33 -05:00
|
|
|
func (parent *Node) NewSlider(name string, x int, y int) *Node {
|
2024-01-05 13:18:44 -06:00
|
|
|
newNode := parent.newNode(name, widget.Slider)
|
2023-05-09 20:25:37 -05:00
|
|
|
|
|
|
|
newNode.Custom = func() {
|
2024-01-03 18:15:54 -06:00
|
|
|
log.Log(GUI, "even newer clicker() name in NewSlider name =", name)
|
2023-05-09 20:25:37 -05:00
|
|
|
}
|
2022-10-19 13:23:22 -05:00
|
|
|
|
2023-05-09 08:38:33 -05:00
|
|
|
newNode.X = x
|
|
|
|
newNode.Y = y
|
2024-01-05 13:18:44 -06:00
|
|
|
a := newAction(newNode, widget.Add)
|
2023-03-23 12:35:12 -05:00
|
|
|
a.X = x
|
|
|
|
a.Y = y
|
2023-05-09 18:53:31 -05:00
|
|
|
sendAction(a)
|
2023-03-23 12:35:12 -05:00
|
|
|
|
2022-11-13 08:53:03 -06:00
|
|
|
return newNode
|
2022-10-16 08:07:13 -05:00
|
|
|
}
|