LabelSwatch uses the new button functions
This commit is contained in:
parent
f4a3cb3c00
commit
155752ba78
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user