bevy/examples/ui
CatThingy 89cbc78d3d
Require #[derive(Event)] on all Events (#7086)
# Objective

Be consistent with `Resource`s and `Components` and have `Event` types
be more self-documenting.
Although not susceptible to accidentally using a function instead of a
value due to `Event`s only being initialized by their type, much of the
same reasoning for removing the blanket impl on `Resource` also applies
here.

* Not immediately obvious if a type is intended to be an event
* Prevent invisible conflicts if the same third-party or primitive types
are used as events
* Allows for further extensions (e.g. opt-in warning for missed events)

## Solution

Remove the blanket impl for the `Event` trait. Add a derive macro for
it.

---

## Changelog

- `Event` is no longer implemented for all applicable types. Add the
`#[derive(Event)]` macro for events.

## Migration Guide

* Add the `#[derive(Event)]` macro for events. Third-party types used as
events should be wrapped in a newtype.
2023-06-06 14:44:32 +00:00
..
button.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00
flex_layout.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00
font_atlas_debug.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
grid.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00
overflow.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00
overflow_debug.rs Remove outdated example code/comment (#8635) 2023-05-19 18:21:26 +00:00
relative_cursor_position.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00
size_constraints.rs Require #[derive(Event)] on all Events (#7086) 2023-06-06 14:44:32 +00:00
text.rs Allow systems using Diagnostics to run in parallel (#8677) 2023-06-05 20:51:22 +00:00
text_debug.rs Allow systems using Diagnostics to run in parallel (#8677) 2023-06-05 20:51:22 +00:00
text_wrap_debug.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00
transparency_ui.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00
ui.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00
ui_scaling.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00
window_fallthrough.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
z_index.rs Flatten UI Style properties that use Size + remove Size (#8548) 2023-05-16 01:36:32 +00:00