diff --git a/labelswatch.go b/labelswatch.go index b1f2d5e..da54cd3 100644 --- a/labelswatch.go +++ b/labelswatch.go @@ -63,12 +63,12 @@ func (this *LabelSwatch) OnConfirm (callback func ()) event.Cookie { } func (this *LabelSwatch) handleButtonDown (button input.Button) bool { - if button != input.ButtonLeft { return true } + if !isClickingButton(button) { return true } return true } func (this *LabelSwatch) handleButtonUp (button input.Button) bool { - if button != input.ButtonLeft { return true } + if !isClickingButton(button) { return true } if this.Window().MousePosition().In(this.Bounds()) { this.swatch.SetFocused(true) this.swatch.Choose()