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

[3.x] Clean-up and refactor of the Android input implementation #65398

Merged
merged 2 commits into from Sep 8, 2022

Conversation

m4gr3d
Copy link
Contributor

@m4gr3d m4gr3d commented Sep 6, 2022

The first commit cleans up and refactors the Android input implementation:

  • All input logic is delegated to the GodotInputHandler.java class which is now responsible for setting up and configuring the gesture handler logic
  • The mouse & touch input logic has been refactored to rely primarily on the gesture handler
  • The gesture handler logic was updated to include support for long press, multi-finger panning and scaling gestures. These gestures are disabled by default to mirror the current behavior
  • The native input implementation was cleaned up to consolidate the logic in a few methods: process_touch_event for touch, process_mouse_event for mouse & stylus, and process_magnify and process_pan for scaling and panning gestures.

In the process, the PR addresses several existing Android input bugs:
Fixes #8151, #46100, #46101

Supersedes #59760, #54225

The second commit enables the long press, multi-finger panning and scaling gestures for the Godot Android Editor and fixes an input related bug that uses to cause a crash when clicking on the play button from the editor window.

Addresses some of the issues reported in godotengine/godot-proposals#3931

godot_android_editor_multi_touch_pixel5.mp4

master version

@akien-mga
Copy link
Member

CC @madmiraal @thebestnom

@akien-mga akien-mga merged commit 973457e into godotengine:3.x Sep 8, 2022
@akien-mga
Copy link
Member

Thanks!

@m4gr3d m4gr3d deleted the cleanup_input_logic_3x branch September 8, 2022 07:19
@Calinou
Copy link
Member

Calinou commented Sep 9, 2022

Should this be considered for a 3.5.1 cherry-pick? Having double-tap and right-click will make the Android editor much more usable, without having to wait for 3.6.

@m4gr3d
Copy link
Contributor Author

m4gr3d commented Sep 9, 2022

Should this be considered for a 3.5.1 cherry-pick? Having double-tap and right-click will make the Android editor much more usable, without having to wait for 3.6.

@Calinou I think it's risky for a 3.5.1 backport. Since it's a lot of change, I'm expecting to shake out any remaining issues in the new code throughout the 3.6 release process.

For the Android editor, I'm planning to put out a 3.6.beta release either today or in the next few days for users to update and test without having to wait for the full Godot 3.6 release.

@VoxSkynned11
Copy link

Should this be considered for a 3.5.1 cherry-pick? Having double-tap and right-click will make the Android editor much more usable, without having to wait for 3.6.

@Calinou I think it's risky for a 3.5.1 backport. Since it's a lot of change, I'm expecting to shake out any remaining issues in the new code throughout the 3.6 release process.

For the Android editor, I'm planning to put out a 3.6.beta release either today or in the next few days for users to update and test without having to wait for the full Godot 3.6 release.

:0 omg i am really looking forward to that, thanks for all the hard work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants