MCPcopy Create free account
hub / github.com/SolarLune/masterplan / SetValue

Method SetValue

gui.go:3469–3487  ·  view source on GitHub ↗
(value float32)

Source from the content-addressed store, hash-verified

3467}
3468
3469func (s *Scrollbar) SetValue(value float32) {
3470 s.TargetValue = value
3471
3472 if s.TargetValue < 0 {
3473 s.TargetValue = 0
3474 } else if s.TargetValue > 1 {
3475 s.TargetValue = 1
3476 }
3477
3478 if s.OnValueSet != nil {
3479 s.OnValueSet()
3480 }
3481
3482 if s.Property != nil {
3483 tv := s.ValueMin + ((s.ValueMax - s.ValueMin) * s.TargetValue)
3484 s.Property.Set(float64(tv))
3485 }
3486
3487}
3488
3489func (s *Scrollbar) SetValueRaw(value float32) {
3490

Callers 5

UpdateMethod · 0.95
SetValueRawMethod · 0.95
ConstructMenusFunction · 0.95
OpenProjectFromFunction · 0.45
UpdateMethod · 0.45

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected