Closed StarHack closed 3 years ago
This is an initial implementation of a Slider component.
// label label := gocoa.NewLabel(165, 130, 300, 50) label.SetStringValue("test") wnd.AddLabel(label) // slider slider := gocoa.NewSlider(25, 125, 300, 150) slider.SetMaximumValue(10.0) slider.SetMinimumValue(1.0) slider.SetValue(2.5) slider.SetSliderType(gocoa.SliderTypeLinear) slider.OnSliderValueChanged(func() { sliderVal := fmt.Sprintf("%f", slider.Value()) label.SetStringValue(sliderVal) }) wnd.AddSlider(slider)
This is an initial implementation of a Slider component.