Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input: Ignore InputEventScreenTouch #2331

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

jrb0001
Copy link
Contributor

@jrb0001 jrb0001 commented Jul 4, 2024

On android, Godot triggers an InputEventMouseButton in addition to an InputEventScreenTouch and Input.is_action_just_pressed(<mouse action>) already returns true during the touch event. I don't have an ios device to test it, but I assume it would be the same there as well.

subsystem_input.gd currently handles the touch event in _unhandled_input() which makes the input catcher more or less meaningless on a touch device.

This PR will break projects with the setting input_devices/pointing/emulate_mouse_from_touch disabled unless they provide a custom input catcher or use TouchScreenButtons to convert touch into actions. I think thats's an acceptable tradeoff as such a setup also breaks touch input for many other controls like regular Buttons.

@Jowan-Spooner
Copy link
Member

Makes sense to me. Thanks!

@Jowan-Spooner Jowan-Spooner merged commit 925b32f into dialogic-godot:main Jul 4, 2024
2 checks passed
@jrb0001 jrb0001 deleted the input-touch branch July 5, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants