Added double clicking to all buttons on Linux and Javascript#20385
Conversation
|
Formatting needs to be fixed, see Travis CI output :) |
b4f5905 to
ed5a84e
Compare
|
Formatted |
leonkrause
left a comment
There was a problem hiding this comment.
For HTML5, we should eventually let the OS/browser determine double clicks, but I want to fix life-cycle management before that. Until then this is a reasonable implementation.
There was a problem hiding this comment.
Member initialization goes into the constructor
There was a problem hiding this comment.
No need to wrap Vector2 in a Point2 constructor, it's just a typedef. Same for other cases below
ed5a84e to
51fa23a
Compare
|
Made the changes.
I was going to use dblclick event, but according to this it only supports primary mouse button and the event is dispatched after mouse up, whereas Godot needs it after mouse down. |
|
Sorry for the delay. Let's give it a try in the master branch and see how user feedback goes - platform input harmonization is a great improvement :) |
|
Thanks! |
Before only windows supported double clicking on all buttons.
Javascript didn't have double clicking at all and linux and OSX supported double clicking only on left/primary mouse button.
This PR adds double clicking support on all buttons for linux and javascript. For javascript to function properly #20081 is needed or there won't be release event after double click.
It might be better if someone else implements the OSX support, because I don't have a mac and the current implementation is quite different. Though it could be changed to similar to linux and javascript.
Fixes #20042. Not on mac obviously.