mirror of
https://github.com/bevyengine/bevy
synced 2024-12-20 18:13:10 +00:00
ad4144ad7a
# Objective Fixes #16192 ## Solution I renamed the Pointer<Down/Up> to <Pressed/Released> and then I resolved all the errors. Renamed variables like "is_down" to "is_pressed" to maintain consistency. Modified the docs in places where 'down/up' were used to maintain consistency. ## Testing I haven't tested this in any way beside the checks from rust analyzer and the examples in the examples/ directory. --- ## Migration Guide ### `bevy_picking/src/pointer.rs`: #### `enum PressDirection`: - `PressDirection::Down` changes to `PressDirection::Pressed`. - `PressDirection::Up` changes to `PressDirection::Released`. These changes are also relevant when working with `enum PointerAction` ### `bevy_picking/src/events.rs`: Clicking and pressing Events in events.rs categories change from [Down], [Up], [Click] to [Pressed], [Released], [Click]. - `struct Down` changes to `struct Pressed` - fires when a pointer button is pressed over the 'target' entity. - `struct Up` changes to `struct Released` - fires when a pointer button is released over the 'target' entity. - `struct Click` now fires when a pointer sends a Pressed event followed by a Released event on the same 'target'. - `struct DragStart` now fires when the 'target' entity receives a pointer Pressed event followed by a pointer Move event. - `struct DragEnd` now fires when the 'target' entity is being dragged and receives a pointer Released event. - `PickingEventWriters<'w>::down_events: EventWriter<'w, Pointer<Down>>` changes to `PickingEventWriters<'w>::pressed_events: EventWriter<'w, Pointer<Pressed>>`. - `PickingEventWriters<'w>::up_events changes to PickingEventWriters<'w>::released_events`. --------- Co-authored-by: Harun Ibram <harun.ibram@outlook.com> Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |