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

Fixed issue #212 by adding mouse module for visibility with testing #316

Closed

Conversation

kurttepelikerim
Copy link

Created a method to hide mouse directly from Pygame Zero with testing addressed in issue #212.

@lordmauve
Copy link
Owner

We don't need to do this because people can just write

from pygame import mouse
mouse.set_visible(False)

To add value we could either

  • Document this usage, including how to import from pygame (and maybe how and why to import - the docs are for beginners)
  • Add an even easier to use object. We already have mouse but it is an Enum. We could add more methods like
>>> mouse.current_pos 
(548, 139)
>>> mouse.visible
False
>>> mouse.visible = not mouse.visible
>>> mouse.recent_pos
collections.deque([(521, 119), (538, 127), (548, 139)])

I quite like the latter idea because it would let us map mouse buttons to our constants, among other things.

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

Successfully merging this pull request may close these issues.

2 participants