Slider broadcasts slide event when manipulated with key presses

This commit is contained in:
Sasha Koshka 2024-05-17 01:09:59 -04:00
parent 8134069e1f
commit 6fad52b335

View File

@ -98,16 +98,20 @@ func (this *Slider) handleKeyDown (key input.Key, numpad bool) {
} else {
this.SetValue(this.Value() - increment)
}
this.on.slide.Broadcast()
case input.KeyDown, input.KeyRight:
if this.Modifiers().Alt {
this.SetValue(1)
} else {
this.SetValue(this.Value() + increment)
}
this.on.slide.Broadcast()
case input.KeyHome:
this.SetValue(0)
this.on.slide.Broadcast()
case input.KeyEnd:
this.SetValue(1)
this.on.slide.Broadcast()
}
}