-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Implement InputEventGesture (incl. Pan and Magnify) for all platforms #13139
Comments
Poor BSD, it doesn't even get its own checkbox. |
Poor Linux, it has to share its checkbox.. All X11 platforms share the same code, so they can share the same checkbox. |
#25474 Merged, check Android box? |
@nathanwfranke Done. |
And reverted. |
Hi, I made a gdscript (Github, Asset Library) that kind of solves this issue. I wanted to know if it's possible to integrate this gdscript to the engine. |
You can't integrate GDScript into the engine per se, you would have to translate the code to be the same format and workflow. However, since you were able to make the library you should be able to learn the engine without much issues. |
I made some progress on translating my code to the engine (Federico-Ciuffardi@296fbc8), but I'm having issues to convert my library's InputEventPinch to the InputEventMagnifyGesture as the InputEventMagnifyGesture has less attributes (factor and position) than my InputEventPinch (distance, relative, position, speed). I don't know if here is the correct place to ask this but how would be the best way to solve this? |
@Federico-Ciuffardi For whatever implementations are implemented already for iOS, those should be deleted in my opinion. Feel free to add/remove those fields as you want since Godot 4.0 is already broken for compatibility |
Ok! Another question, what is the pan gesture exactly? |
I believe it is general for the drags. So like if I drag 1 finger or 20 fingers to the left that would be a pan to the left. Basically you should be able to hook them all up to a Camera2D and it would be completely functional. |
It's ok if I implement the InputEvents from my library :
|
Instead of MultiScreenDrag do pan. That way if they drag with 2 fingers that would be a pan and it wouldn't be 2x faster |
My implementation of MultiScreenDrag does not cause that, so the pan gesture would be the same as combining ScreenDrag when it's just a finger and otherwise MultiScreenDrag (I do that when I use my library). |
I implemented:
https://github.com/Federico-Ciuffardi/godot/tree/3.2-GDTIM I tested this on a project that used the library modified to work without the library (using the new built-in InputEvents): I don't know how to proceed to make a pull request I would need some help with that 😞 |
@Federico-Ciuffardi first, backup everything you have done on the engine a few times. It would be terrible to lose your progress. Next I would recommend following this tutorial to help you get started with git (using a tool called GitKraken) |
So I just branch out form the current master branch make the changes there, and do the PR for this branch? I do not need prior approval? |
Uh I didn't notice that this tracker included Wayland! For the record, the Wayland PR (#57025) supports both |
I'm considering implementing this for X11 using the XInput extension (see https://gitlab.freedesktop.org/xorg/lib/libxi/-/merge_requests/5). Is it worth the shot given the existence of #39055 ? |
@eobet are you running the editor with |
Awesome! You're welcome :D
Yeah that's a generic issue unfortunately AFAIK. The relative UI controls ought to be fixed directly. |
That's unfortunate but thanks for the info. One thing I did notice, though is that middle mouse button panning in the shader editor is not 1:1 using "prefer wayland". Are you aware of such an issue? |
No, feel free to open up another ticket :D |
Operating system or device, Godot version, GPU Model and driver (if graphics related):
Current master (5a23136).
Issue description:
InputEventGesture
was added to core in #12573, together withInputEventPanGesture
andInputEventMagnifyGesture
, but they're only implemented for macOS so far.They should also be implemented for all platforms where they are relevant. I guess they would make sense on all platforms since gestures can be done on touchscreens as well as touchpads, so the list would be:
See #12573 for the base API and its implementation on macOS.
If more types of gestures are wanted, they should likely be discussed in their own issue, let's keep this one focused on pan and magnify.
The text was updated successfully, but these errors were encountered: