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

Add primary_clicked & secondary_clicked for PointerState. #1580

Closed
aleokdev opened this issue May 5, 2022 · 1 comment · Fixed by #1582
Closed

Add primary_clicked & secondary_clicked for PointerState. #1580

aleokdev opened this issue May 5, 2022 · 1 comment · Fixed by #1582
Labels
feature New feature or request

Comments

@aleokdev
Copy link
Contributor

aleokdev commented May 5, 2022

Is your feature request related to a problem? Please describe.
I'd like to detect if the user clicked something with the primary button somewhere in order to cancel their selection.
While we have .any_click() and .primary_down(), we don't have .primary_clicked()!

Describe the solution you'd like
I'd like a way to know if one button was clicked on this frame.

Describe alternatives you've considered
Using .any_click() && .primary_down(), but this is faulty: The user could be holding down the primary button and then have clicked with another button.

@aleokdev aleokdev added the feature New feature or request label May 5, 2022
@emilk
Copy link
Owner

emilk commented May 5, 2022

Sounds good, please make a PR adding the missing methods!

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

Successfully merging a pull request may close this issue.

2 participants