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

Right click button interactions #2322

Closed
billyb2 opened this issue Jun 9, 2021 · 4 comments
Closed

Right click button interactions #2322

billyb2 opened this issue Jun 9, 2021 · 4 comments
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Feature A new feature, making something new possible

Comments

@billyb2
Copy link
Contributor

billyb2 commented Jun 9, 2021

What problem does this solve or what need does it fill?

Allowing right clicking on buttons would allow for unique behaviors on buttons depending on the type of click.

What solution would you like?

Instead of Clicked being a type of an enum, clicked itself uses the MouseButton enum so that a click can be left, right, middle, or otehr

What alternative(s) have you considered?

Having a RightClicked type, though it feels like code bloat since MouseButton exists.

Additional context

Any other information you would like to add such as related previous work,
screenshots, benchmarks, etc.

@billyb2 billyb2 added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Jun 9, 2021
@alice-i-cecile
Copy link
Member

This would be very well handled with per-entity events, see #2116. The impl there is not far from complete, but needs perf optimization.

@billyb2
Copy link
Contributor Author

billyb2 commented Jun 9, 2021

This would be very well handled with per-entity events, see #2116. The impl there is not far from complete, but needs perf optimization.

So we would have to wait for that to be merged?

@mockersf mockersf added A-UI Graphical user interfaces, styles, layouts, and widgets and removed S-Needs-Triage This issue needs to be labelled labels Jun 9, 2021
@mockersf
Copy link
Member

mockersf commented Jun 9, 2021

I pushed a quick fix for that in #2324

It will probably change how that works with the UI rework, but it's a small enough fix to do it now 👍

@alice-i-cecile
Copy link
Member

This is now complete due to bevy_picking's creation and integration with bevy_ui.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Feature A new feature, making something new possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants