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

Touchscreen on PiTFT without mouse not working #424

Closed
asztalosdani opened this issue Nov 28, 2022 · 4 comments · Fixed by #427
Closed

Touchscreen on PiTFT without mouse not working #424

asztalosdani opened this issue Nov 28, 2022 · 4 comments · Fixed by #427
Labels

Comments

@asztalosdani
Copy link
Contributor

Environment information

  • OS: Raspbian 11 (bullseye)
  • python version: v3.9.2
  • pygame version: v1.9.6
  • pygame-menu version: v4.2.8

Describe the bug
Running a menu with mouse_visible=False does not work on a Raspberry with a PiTFT touchscreen.

To Reproduce
I copied the menu from the quickstart guide, and added mouse_visible=False.

Expected behavior
The menu does not react to any touch events.

Additional context
If I set mouse_visible=True it works as expected, but I want to disable the cursor. The mouse events are correctly triggered if I print them using

events = pygame.event.get()
for event in events:
    if event.type == pygame.QUIT:
        exit()
    if event.type == pygame.MOUSEMOTION:
        print(pygame.mouse.get_pos())
    if event.type == pygame.MOUSEBUTTONDOWN:
        print(pygame.mouse.get_pressed())

The touchscreen and touchscreen_motion_selection make no difference, but I'm not sure they should as they are only for pygame 2 right?

@ppizarror
Copy link
Owner

Hi! I'll take a look at this issue asap!

@ppizarror
Copy link
Owner

Does #427 solves your issue?

@asztalosdani
Copy link
Contributor Author

Yes, thanks!

@ppizarror
Copy link
Owner

Nice. I'll publish v4.3.0 to pypi today

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

Successfully merging a pull request may close this issue.

2 participants