mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
io/pointer: [API] rename PointerEvent.Type to Kind
Kind is the idiomatic field name for distinguishing a struct without using separate types. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -271,10 +271,10 @@ func (e *Selectable) processPointer(gtx layout.Context) {
|
||||
case pointer.Event:
|
||||
release := false
|
||||
switch {
|
||||
case evt.Type == pointer.Release && evt.Source == pointer.Mouse:
|
||||
case evt.Kind == pointer.Release && evt.Source == pointer.Mouse:
|
||||
release = true
|
||||
fallthrough
|
||||
case evt.Type == pointer.Drag && evt.Source == pointer.Mouse:
|
||||
case evt.Kind == pointer.Drag && evt.Source == pointer.Mouse:
|
||||
if e.dragging {
|
||||
e.text.MoveCoord(image.Point{
|
||||
X: int(math.Round(float64(evt.Position.X))),
|
||||
|
||||
Reference in New Issue
Block a user