bevy/crates
TehPers a5d70b8952 Derive Reflect + FromReflect for window event types (#6235)
# Objective

The window event types currently don't support reflection. This PR adds support to them (as requested [here](https://github.com/bevyengine/bevy/issues/6223#issuecomment-1273852329)).

## Solution

Implement `Reflect` + `FromReflect` for window event types. Relevant traits are also being reflected with `#[reflect(...)]` attributes.

Additionally, this PR derives `Reflect` + `FromReflect` for `WindowDescriptor` and the types it depends on so that `CreateWindow` events can be fully manipulated through reflection.

Finally, this PR adds `FromReflect` for `PathBuf` as a value type, which is needed for `FileDragAndDrop`.

This adds the "glam" feature to the `bevy_reflect` dependency for package `bevy_window`. Since `bevy_window` transitively depends on `glam` already, all this brings in are the reflection `impl`s.

## Open questions

Should `app.register_type::<PathBuf>();` be moved to `CorePlugin`? I added it to `WindowPlugin` because that's where it's used and `CorePlugin` doesn't seem to register all the missing std types, but it would also make sense in `CorePlugin` I believe since it's a commonly used type.

---

## Changelog

Added:
- Implemented `Reflect` + `FromReflect` for window events and related types. These types are automatically registered when adding the `WindowPlugin`.
2022-12-09 01:20:44 +00:00
..
bevy_animation
bevy_app
bevy_asset
bevy_audio
bevy_core
bevy_core_pipeline
bevy_derive
bevy_diagnostic
bevy_dylib
bevy_dynamic_plugin Adapt path type of dynamically_load_plugin (#6734) 2022-12-05 23:39:43 +00:00
bevy_ecs remove a doc(hidden) on read only version of derive(WorldQuery) (#6877) 2022-12-07 23:10:26 +00:00
bevy_ecs_compile_fail_tests
bevy_encase_derive
bevy_gilrs
bevy_gltf
bevy_hierarchy Remove APIs deprecated in 0.9 (#6801) 2022-12-05 22:49:04 +00:00
bevy_input
bevy_internal
bevy_log
bevy_macro_utils
bevy_math Improve code/comments for Ray::intersect_plane and its tests (#6823) 2022-12-05 22:49:06 +00:00
bevy_mikktspace
bevy_pbr ShaderDefVal: add an UInt option (#6881) 2022-12-07 23:10:27 +00:00
bevy_ptr
bevy_reflect Updated docs for `List Trait in bevy_reflect` (#6872) 2022-12-07 23:10:25 +00:00
bevy_render ShaderDefVal: add an UInt option (#6881) 2022-12-07 23:10:27 +00:00
bevy_scene
bevy_sprite
bevy_tasks
bevy_text Remove TextError::ExceedMaxTextAtlases(usize) variant (#6796) 2022-12-05 23:23:16 +00:00
bevy_time
bevy_transform
bevy_ui Remove TextError::ExceedMaxTextAtlases(usize) variant (#6796) 2022-12-05 23:23:16 +00:00
bevy_utils
bevy_window Derive Reflect + FromReflect for window event types (#6235) 2022-12-09 01:20:44 +00:00
bevy_winit