(value float32)
| 3467 | } |
| 3468 | |
| 3469 | func (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 | |
| 3489 | func (s *Scrollbar) SetValueRaw(value float32) { |
| 3490 |
no test coverage detected