Skip to content

Conversation

@veloce
Copy link
Collaborator

@veloce veloce commented Jul 2, 2024

So far we've been using a GestureDetector from flutter. In this PR, it is replaced by the low level Listener which allow to listen to raw events and make a custom gesture detector tailored to lichess usage.

This brings many changes in the way to interact with the board:

Playing:

  • pieces can now be moved with 2 tap down events, instead of a a full tap (pointer down followed by another pointer up event): this allows for a faster interaction
  • premoves are not anymore cleared when selecting another piece: this matches lichess website behaviour and allow to prepare another move along with the premove that is currently set

Drawing shapes (experimental)

  • drawing shapes is now possible while keeping the normal board play interaction (before it was either one or another mode)
  • one can draw a shape by holding a finger to an empty square while using a second finger to draw a shape anywhere in the board
  • a double tap on an empty square will clear all shapes at once
  • to clear a single shape is still supported: draw the same shape again

@veloce veloce changed the title Replace GestureDetector with EventListener Improve board interactions with a custom gesture detector Jul 3, 2024
@veloce veloce marked this pull request as ready for review July 4, 2024 13:36
@veloce veloce merged commit a22b868 into main Jul 5, 2024
@veloce veloce deleted the event_listener branch July 5, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants