gesture: [API] rename gesture state update methods to Update

Change the gesture state update methods to align with the convention.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2023-10-07 10:30:34 -05:00
parent dc170033cd
commit c756986d9e
10 changed files with 24 additions and 25 deletions
+3 -3
View File
@@ -28,14 +28,14 @@ func TestHover(t *testing.T) {
r.Queue(
pointer.Event{Kind: pointer.Move, Position: f32.Pt(30, 30)},
)
if !h.Hovered(r) {
if !h.Update(r) {
t.Fatal("expected hovered")
}
r.Queue(
pointer.Event{Kind: pointer.Move, Position: f32.Pt(50, 50)},
)
if h.Hovered(r) {
if h.Update(r) {
t.Fatal("expected not hovered")
}
}
@@ -75,7 +75,7 @@ func TestMouseClicks(t *testing.T) {
r.Frame(&ops)
r.Queue(tc.events...)
events := click.Events(&r)
events := click.Update(&r)
clicks := filterMouseClicks(events)
if got, want := len(clicks), len(tc.clicks); got != want {
t.Fatalf("got %d mouse clicks, expected %d", got, want)