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 {
|
func (this *LabelSwatch) handleButtonDown (button input.Button) bool {
|
||||||
if button != input.ButtonLeft { return true }
|
if !isClickingButton(button) { return true }
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *LabelSwatch) handleButtonUp (button input.Button) bool {
|
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()) {
|
if this.Window().MousePosition().In(this.Bounds()) {
|
||||||
this.swatch.SetFocused(true)
|
this.swatch.SetFocused(true)
|
||||||
this.swatch.Choose()
|
this.swatch.Choose()
|
||||||
|
Loading…
Reference in New Issue
Block a user