package main

import (
	"go.wit.com/dev/andlabs/ui"
	_ "go.wit.com/dev/andlabs/ui/winmanifest"
)

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) {
		n.value = newt.uiSlider.Value()
		n.doUserEvent()
	})

	n.tk = newt
	p.place(n)
}
