Reflect derived traits on all components and resources: bevy_window (#15233)

Solves https://github.com/bevyengine/bevy/issues/15187 for bevy_window.
This is the last one.
This commit is contained in:
Blazepaws 2024-09-15 19:49:00 +02:00 committed by GitHub
parent 1c2e1fc15a
commit 4d65757b3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -22,7 +22,7 @@ use bevy_reflect::{ReflectDeserialize, ReflectSerialize};
derive(serde::Serialize, serde::Deserialize),
reflect(Serialize, Deserialize)
)]
#[reflect(Component)]
#[reflect(Component, Debug)]
pub struct Monitor {
/// The name of the monitor
pub name: Option<String>,
@ -42,7 +42,7 @@ pub struct Monitor {
/// A marker component for the primary monitor
#[derive(Component, Debug, Clone, Reflect)]
#[reflect(Component)]
#[reflect(Component, Debug)]
pub struct PrimaryMonitor;
impl Monitor {

View file

@ -20,7 +20,7 @@ use bevy_utils::tracing::warn;
/// with this component if [`primary_window`](crate::WindowPlugin::primary_window)
/// is `Some`.
#[derive(Default, Debug, Component, PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Reflect)]
#[reflect(Component)]
#[reflect(Component, Debug, Default, PartialEq)]
pub struct PrimaryWindow;
/// Reference to a [`Window`], whether it be a direct link to a specific entity or
@ -124,7 +124,7 @@ impl NormalizedWindowRef {
derive(serde::Serialize, serde::Deserialize),
reflect(Serialize, Deserialize)
)]
#[reflect(Component, Default)]
#[reflect(Component, Default, Debug)]
pub struct Window {
/// The cursor options of this window. Cursor icons are set with the `Cursor` component on the
/// window entity.