Phaser: Support For Double Click

Created on 21 Jan 2019  路  2Comments  路  Source: photonstorm/phaser

I'd love to be able to easily see if a touch or click is a double touch/click. I'm not currently seeing anything in the source that would support this, but let me know if I'm missing it somewhere.

I don't know what the best way to implement this would be, but if we wanted to add a clickCount field to the pointer, that tracks the number of consecutive clicks (that resets if one comes after ~300ms) , as well as a "pointerdoubleclick" event that could be emitted on Interactive Sprites, that would make sense to me.

[Optional] Do you want to help provide this feature?

If this seems like a feature worth having, I'd love to try to create a PR for it. Just let me know if there are any specifics in the implementation you would like me to look out for!

馃挅 Feature Request

Most helpful comment

This is a gesture, really, so I'd rather not add it as a 'core' feature, because it relies on you customizing the delay value, and instead focus on creating a more generic 'gesture' structure into which this would fall (along with swipe, tap, pinch, etc)

All 2 comments

This is a gesture, really, so I'd rather not add it as a 'core' feature, because it relies on you customizing the delay value, and instead focus on creating a more generic 'gesture' structure into which this would fall (along with swipe, tap, pinch, etc)

Thank you for opening this feature request (all those months ago!). As the development of Phaser 4 has now started I am tidying-up the repo and closing off old issues that won't be directly fixed or implemented in Phaser 3 by me. I would still consider community PRs that address this issue, however, and have left the GitHub tags intact so others can track them if they wish to get involved. However, I'm afraid this is no longer a feature that will be added to v3.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Secretmapper picture Secretmapper  路  3Comments

Legomite picture Legomite  路  4Comments

hugoruscitti picture hugoruscitti  路  3Comments

JarLowrey picture JarLowrey  路  4Comments

cncolder picture cncolder  路  4Comments