Skip to content

Fix for _on_card_deselected for touch screens.#23

Merged
tdecker91 merged 1 commit intotdecker91:mainfrom
peteristhegreat:main
Jan 23, 2026
Merged

Fix for _on_card_deselected for touch screens.#23
tdecker91 merged 1 commit intotdecker91:mainfrom
peteristhegreat:main

Conversation

@peteristhegreat
Copy link
Contributor

Don't emit card_clicked, unless it was the card pressed in the first place. Helps for touch screens.

Don't emit card_clicked, unless it was the card pressed in the first place.  Helps for touch screens.
@tdecker91 tdecker91 self-assigned this Jan 23, 2026
Copy link
Owner

@tdecker91 tdecker91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @peteristhegreat
Great change, thanks for the contribution. When testing I noticed this helps with a mouse as well by preventing deselect event if you mouse down off the card and then mouse up over the card. Which I think is better behavior. Probably the same thing you noticed with a touchscreen.

Thanks!

@tdecker91 tdecker91 merged commit fd72dd3 into tdecker91:main Jan 23, 2026
2 checks passed
@peteristhegreat
Copy link
Contributor Author

BTW, this is my project in progress using the library:

https://peteristhegreat.itch.io/five-crowns (It's still in beta but works pretty well)

I should probably just move this to another discussion or thread or fork, but a few other features I got working that might be useful in some examples for other people:

  • hand layouts for other players around the edge of the screen (seat anchors) especially in a responsive layout (mobile landscape or vertical or desktop).

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