Conversation
|
Made some changes @Shatur, let me know what you think. Found some other examples that I'm happy to change to |
Shatur
left a comment
There was a problem hiding this comment.
Looks like we have more examples, could you update them too?
examples/ui/size_constraints.rs
examples/ui/display_and_visibility.rs
examples/ui/button.rs
examples/mobile/src/lib.rs
crates/bevy_ui/src/focus.rs
|
Apologies still working on this and will hopefully have it done in a week probably. Real life nonsense currently imposing. :( |
|
Take your time, hope everything is alright! |
|
@AnthonyKalaitzis hope that you are doing okay! Let me know if you are not longer interested, I will finish this PR for you. |
|
@Shatur Mega apologies, fell of the face of the earth there for a bit (employment interviews zzzzz). Will have the other examples finished by today or tomorrow hopefully. Just pushed one to let people know I'm still alive and working on it. Sorry again for the delay 😢 |
|
Just a small question: Why not send the click event in |
This sounds like a great suggestion! @AnthonyKalaitzis could you try the suggested approach? I think you can do it here: |
Shatur
left a comment
There was a problem hiding this comment.
Thank you a lot!
One minor nitpick that you can apply from browser and we are good to go
|
Big thanks @Shatur for sticking with me through that painful process 😄! Very much a learning experience for me, haven't done much open source stuff before. Big thanks 🥇 |
nicoburns
left a comment
There was a problem hiding this comment.
I think at some point we'll want better handling of cases where there are multiple elements on top of each other (so the top element captures the event, and it doesn't fire on all overlapping elements). But this seems like an improvement over what we have.
|
@AnthonyKalaitzis could you resolve conflicts? |
|
Adopted in #10141. Don't worry, credit will be shared if this gets merged and your ongoing participation in that thread would be welcome. |
Objective
Solution
Clickevents when anInteractiongoes fromInteraction::HoveredtoInteraction::PressedClickevent sends intoUiPluginby defaultgame_menu.rsexample to useClickrather then manually checking theInteractionAs an aside, I haven't changed any other bevy example that could use
Clickjust yet. If my implementation is along the lines of what people want then happy to skim through the UI examples and migrate them to useClickif wanted.Possibly interested party @Shatur :)