-
Notifications
You must be signed in to change notification settings - Fork 229
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
Touchpad gestures are detected in input map, but don't work when project is run. #763
Comments
scrolling is not a continuous thing. I'm using .net and am more familiar with input events, but to me it seems like you really shouldn't check if you are scrolling or not in the process method, unless of course scrolling input is accumulated but I have no idea about that. what about scrolling with an actual mouse? does that work? if not, I'm probably right and you should find another way of processing input. however if it does work, then I have no idea EDIT: I tried it, it doesn't work with a mouse. so I'm probably right |
replace your script with this to see what I'm talking about
this has a scroll flag that will be set any time a scroll up event is detected, the flag is read at next frame and reset after processing. this means you won't lose a scroll between frames. you will however miss the amount of scrolls, and this is scroll up only, so you could replace the flag with an integer buffer, have events count it up or down respectively, process the data accordingly, then reset to 0 |
I've found a fix, replacing "pressed" to "just_pressed" |
I've found a fix above, but I'm wondering, why does it work this way? |
Tested versions
-Reproducible since 4.2, can't check on 4.0 due to scene parsing issues.
System information
Redot v4.4.dev (5e7e5fc) - Windows 10.0.22631 - Multi-window, 1 monitor - OpenGL 3 (Compatibility) - Intel(R) UHD Graphics 600 (Intel Corporation; 31.0.101.2128) - Intel(R) Celeron(R) N4120 CPU @ 1.10GHz (4 threads)
Issue description
On the input map, it detects scroll zoom and scroll pan (ctrl+scroll wheel on a regular mouse) gestures on a touchpad, but does not recognize them project is running.
Steps to reproduce
All these steps require a touchpad.
-Add scroll up/down for all devices(when listening for input, gestures are detected)
-Make an event where scrolling up or down triggers something.
-When project is run, touchpad gestures do not work
Minimal reproduction project (MRP)
When you scroll up or down, it is supposed to hide, which does not work with laptop gestures.
Just to make sure my code works, when "E" is pressed it is supposed to make it hide, which works.
gesture test.zip
The text was updated successfully, but these errors were encountered: