-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Scrollbar in general not working with touchscreen #347
Comments
I can try to log all pygame events if that helps you to track the bug, or if you want send me a script to test and I'll run it. Thank you |
It's strange because I cannot reproduce that using an touch emulator. Can you print the events list read by Scrollbar.update, that is, printing the list within That would give me an idea about what events are being processed by the menu |
@anxuae hi! Do you experience touchscreen issues regarding scrolling? |
Using the scroll_menu.py example, adding |
I'm seeing that there are no check for FINGERUP/DOWN/MOTION in that method. Could that be the problem? |
Yes, you're right. Even the scrollbars do not consider the same configurations as the menu. I do not know how I've missed that pygame-menu/pygame_menu/_scrollarea.py Line 257 in 0e2814c
I'll push a PR asap |
Hi, #349 fixes this issue. However, the solution is far from perfect as the amount of scrolled "dx, dy" is not consistent across different scroll surfaces. I had to figure out the correct maths |
I think I've found a better solution, and it was considering the dx, dy are within range (-1, 1), thus, 2*window_size must be applied. Let me know if the PR's solves the issue |
It's working great now for the scroll_menu example, but the scroll in the dropselect or multiselect is still not working (I merged both pull request to test it). |
Hi! I've found what was bad in PR. The Frame's ScrollArea object (which includes the ScrollBar widgets) was not properly configured (both menu - for scrolling, and controls settings). Also, the frame did not configure the menu reference for the scrollarea while calling I've committed to #349. Let me know about anything! 😎 |
Working smoothly now! Thanks!! |
Excellent, I'll push the new version on the weekend. Please open any other issue if I'd encounter any issue =) |
Environment information
Describe your environment information, such as:
Describe the bug
Scroll bar doesn't respond to touch on the screen. I can't drag the slider from the scroll bar. At some point I try to touch lower in the scroll bar to see if at least I can go down not dragging but jumping to the lower section (I don't know if this make sense), but it also doesn't work. Same test in the computer with the mouse works perfectly. When I try to slide the scroll bar, it seems to gets selected because it changes color, but nothing happen.
To Reproduce
![video2](https://user-images.githubusercontent.com/4296015/119374557-b482a600-bc87-11eb-8275-6fc41ed868cd.gif)
I copied the scroll_menu example and added
touchscreen=True
in all menus. The result is I can select buttons, go inside other menu and go back with the X, but scroll bar doesn't respond to touchs.The text was updated successfully, but these errors were encountered: