Slider broadcasts slide event when manipulated with key presses
This commit is contained in:
parent
8134069e1f
commit
6fad52b335
@ -98,16 +98,20 @@ func (this *Slider) handleKeyDown (key input.Key, numpad bool) {
|
|||||||
} else {
|
} else {
|
||||||
this.SetValue(this.Value() - increment)
|
this.SetValue(this.Value() - increment)
|
||||||
}
|
}
|
||||||
|
this.on.slide.Broadcast()
|
||||||
case input.KeyDown, input.KeyRight:
|
case input.KeyDown, input.KeyRight:
|
||||||
if this.Modifiers().Alt {
|
if this.Modifiers().Alt {
|
||||||
this.SetValue(1)
|
this.SetValue(1)
|
||||||
} else {
|
} else {
|
||||||
this.SetValue(this.Value() + increment)
|
this.SetValue(this.Value() + increment)
|
||||||
}
|
}
|
||||||
|
this.on.slide.Broadcast()
|
||||||
case input.KeyHome:
|
case input.KeyHome:
|
||||||
this.SetValue(0)
|
this.SetValue(0)
|
||||||
|
this.on.slide.Broadcast()
|
||||||
case input.KeyEnd:
|
case input.KeyEnd:
|
||||||
this.SetValue(1)
|
this.SetValue(1)
|
||||||
|
this.on.slide.Broadcast()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user