-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Rename Interaction::Click #8989
Copy link
Copy link
Closed
Labels
A-InputPlayer input via keyboard, mouse, gamepad, and morePlayer input via keyboard, mouse, gamepad, and moreA-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to use
Description
What problem does this solve or what need does it fill?
When I saw this variant, I thought that it works like in usual in UI - if I press and release the RMB over the button, then it is considered as "clicked". Also all examples check Interaction::Click for button pressing.
But it's not how it works! Interaction::Click just represents the pressed state of a button.
What solution would you like?
Rename Interaction::Click into Interaction::Pressed. This will by much clear. No functional changes.
Additional context
I think Interaction represents the state of the button and it's handy for changing the appearance.
But to check for clicking, I would add additional mechanism and I think it should be an event, not a state (an RMB press and then release over the button).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-InputPlayer input via keyboard, mouse, gamepad, and morePlayer input via keyboard, mouse, gamepad, and moreA-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to use