-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
What problem does this solve or what need does it fill?
Recently we renamed Interaction::Click into Interaction::Pressed and it makes a lot of sense. But we still don't have mechanism for actual clicks. It's different from button press: it's a transition from pressed and released state when the cursor stays on the button.
What solution would you like?
I would suggest to introduce event struct Click(Entity) event that contains the clicked entity.
Additional context
It's very simple to implement, here is the implementation from my game. The event happens on transition from Interaction::Clicked to Interaction::Hovered, you don't even need to check the mouse position, Interaction::Hovered gives it's to you for free.
If we implement it, we need to change the example to check for click instead of button press.
@AnthonyKalaitzis you may be interested in implementing this.