bevy/crates/bevy_winit/src
Christian Hughes 219b5930f1
Rename App/World::observe to add_observer, EntityWorldMut::observe_entity to observe. (#15754)
# Objective

- Closes #15752

Calling the functions `App::observe` and `World::observe` doesn't make
sense because you're not "observing" the `App` or `World`, you're adding
an observer that listens for an event that occurs *within* the `World`.
We should rename them to better fit this.

## Solution

Renames:
- `App::observe` -> `App::add_observer`
- `World::observe` -> `World::add_observer`
- `Commands::observe` -> `Commands::add_observer`
- `EntityWorldMut::observe_entity` -> `EntityWorldMut::observe`

(Note this isn't a breaking change as the original rename was introduced
earlier this cycle.)

## Testing

Reusing current tests.
2024-10-09 15:39:29 +00:00
..
accessibility.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
converters.rs Add the functions start_drag_move and start_drag_resize to Window (#15674) 2024-10-08 16:32:07 +00:00
cursor.rs Rename App/World::observe to add_observer, EntityWorldMut::observe_entity to observe. (#15754) 2024-10-09 15:39:29 +00:00
lib.rs Inverse bevy_render bevy_winit dependency and move cursor to bevy_winit (#15649) 2024-10-06 18:25:50 +00:00
state.rs Inverse bevy_render bevy_winit dependency and move cursor to bevy_winit (#15649) 2024-10-06 18:25:50 +00:00
system.rs Add the functions start_drag_move and start_drag_resize to Window (#15674) 2024-10-08 16:32:07 +00:00
winit_config.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
winit_monitors.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
winit_windows.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00