From 155752ba78705f0502c69d90d5f6fb861a576593 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 16 Aug 2024 18:32:07 -0400 Subject: [PATCH] LabelSwatch uses the new button functions --- labelswatch.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()