aevyrie / bevy_eventlistener

Event listening, bubbling, and callbacks
Apache License 2.0
178 stars 27 forks source link

Re-export `ListenerInput` #6

Closed rosingrind closed 1 year ago

rosingrind commented 1 year ago

If I understand correctly, ListenerInput should probably be re-exported with other callbacks here:

https://github.com/aevyrie/bevy_eventlistener/blob/4d8de4c9f715d0dda4f355ba2e5b3a275d6c2c10/src/lib.rs#L9-L13

as it's commonly used like in this bevy_mod_picking example:

struct DoSomethingComplex(Entity, f32);

impl From<ListenerInput<Pointer<Down>>> for DoSomethingComplex {
    fn from(event: ListenerInput<Pointer<Down>>) -> Self {
        DoSomethingComplex(event.target, event.hit.depth)
    }
}
aevyrie commented 1 year ago

Complete. Thanks!