2024-01-01 16:11:54 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-01-15 16:11:40 -06:00
|
|
|
"go.wit.com/dev/andlabs/ui"
|
|
|
|
_ "go.wit.com/dev/andlabs/ui/winmanifest"
|
2024-01-01 16:11:54 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
func (p *node) newSlider(n *node) {
|
|
|
|
newt := new(guiWidget)
|
|
|
|
|
|
|
|
s := ui.NewSlider(n.X, n.Y)
|
|
|
|
newt.uiSlider = s
|
|
|
|
newt.uiControl = s
|
|
|
|
|
|
|
|
s.OnChanged(func(spin *ui.Slider) {
|
2024-01-11 17:19:47 -06:00
|
|
|
n.value = newt.uiSlider.Value()
|
2024-01-01 16:11:54 -06:00
|
|
|
n.doUserEvent()
|
|
|
|
})
|
|
|
|
|
|
|
|
n.tk = newt
|
|
|
|
p.place(n)
|
|
|
|
}
|