Skip to content

RayLib swipe gesture badly implemented #39

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

Open
GreenSnakeLinux opened this issue Mar 12, 2025 · 1 comment
Open

RayLib swipe gesture badly implemented #39

GreenSnakeLinux opened this issue Mar 12, 2025 · 1 comment

Comments

@GreenSnakeLinux
Copy link
Contributor

Hello Victor,

How are you ?

I have realized while coding a small game that the swipe gesture is not well handled by RayLib
So I wondering if we can get the gesture from the java part and override the gesture of Raylib
Method to override: GetGestureDetected() / GetTouchPosition()

I have started something here (the project is shared with your username):
https://github.com/GreenSnakeLinux/PuzzleImage/blob/main/app/src/main/java/com/thefccompany/puzzleimage/features/Gesture.java
But I don't know of to superpose the surfaceView with the native view ? If you have an idea it will be great to have this feature

List of gesture type to return by GetGestureDetected() :
GESTURE_NONE = 0, // No gesture
GESTURE_TAP = 1, // Tap gesture
GESTURE_DOUBLETAP = 2, // Double tap gesture
GESTURE_HOLD = 4, // Hold gesture
GESTURE_DRAG = 8, // Drag gesture
GESTURE_SWIPE_RIGHT = 16, // Swipe right gesture
GESTURE_SWIPE_LEFT = 32, // Swipe left gesture
GESTURE_SWIPE_UP = 64, // Swipe up gesture
GESTURE_SWIPE_DOWN = 128, // Swipe down gesture
GESTURE_PINCH_IN = 256, // Pinch in gesture
GESTURE_PINCH_OUT = 512 // Pinch out gesture

BRs,
Cyrille

@Bigfoot71
Copy link
Owner

Bigfoot71 commented Mar 13, 2025

Hi, I'm doing well, thanks! I hope you are too.

I'm sorry, but I'm really short on time and can't run any tests on my end.

I just tried to understand your code, but I couldn't find where you instantiate your Gesture class.

What exactly is the issue with the swipe gestures?

I could try to take a look at it on my end, but if an issue with rgestures.h is confirmed, then opening an issue on the raylib repository would be welcome.

I actually remember fixing gesture-related issues on Android in raylib a year or two ago, after testing, they were all working again.

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

No branches or pull requests

2 participants