Keyboard controls activate on key down instead of key up
This commit is contained in:
@@ -172,12 +172,12 @@ func (this *Swatch) userSetValue (value color.Color) {
|
||||
|
||||
func (this *Swatch) handleKeyDown (key input.Key, numberPad bool) bool {
|
||||
if key != input.KeyEnter && key != input.Key(' ') { return false }
|
||||
this.Choose()
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *Swatch) handleKeyUp (key input.Key, numberPad bool) bool {
|
||||
if key != input.KeyEnter && key != input.Key(' ') { return false }
|
||||
this.Choose()
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user