LabelSwatch uses the new button functions

This commit is contained in:
Sasha Koshka 2024-08-16 18:32:07 -04:00
parent f4a3cb3c00
commit 155752ba78

View File

@ -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()