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

Unable to hide the cursor, due to pygame_menu #455

Closed
Merklins opened this issue Mar 8, 2023 · 3 comments · Fixed by #456
Closed

Unable to hide the cursor, due to pygame_menu #455

Merklins opened this issue Mar 8, 2023 · 3 comments · Fixed by #456

Comments

@Merklins
Copy link

Merklins commented Mar 8, 2023

  • OS: win
  • python version: v3.11.1
  • pygame version: v2.1.3 dev8
  • pygame-menu version: v4.3.1

Due to the use of pygame_menu, pygame.mouse.set_visible() does not work

import sys, pygame, pygame_menu
pygame.init()

screen = pygame.display.set_mode((1920, 1080), pygame.FULLSCREEN)
pygame.mouse.set_visible(False)

menu = pygame_menu.Menu('Bug', 1920, 1080)
pygame.mouse.set_visible()

while True:
    events = pygame.event.get()
    for event in events:
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()

    key = pygame.key.get_pressed()

    if key[pygame.K_ESCAPE]:
        pygame.quit()
        sys.exit()

    menu.draw(screen)
    menu.update(events)
    pygame.display.update()

The cursor should have disappeared, but it still remains visible, everything works without pygame_menu

@ppizarror
Copy link
Owner

ppizarror commented Mar 8, 2023

Hi! Right now, the Menu updates the cursor visibility. Thus, I introduced a new param mouse_visible_update to disable this feature.

Can you check out #456, using menu = pygame_menu.Menu('Bug', 1920, 1080, mouse_visible_update=False), to test this feature?

@ppizarror ppizarror added enhancement and removed bug labels Mar 8, 2023
@Merklins
Copy link
Author

Merklins commented Mar 8, 2023

So quickly answered, thanks a lot, everything works)

@Merklins Merklins closed this as completed Mar 8, 2023
@ppizarror
Copy link
Owner

I'll merge and upload to PyPI once #453 is solved; greetings 😄

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

Successfully merging a pull request may close this issue.

2 participants