mirror of
https://github.com/bevyengine/bevy
synced 2024-11-21 20:23:28 +00:00
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:
parent
1c2e1fc15a
commit
4d65757b3e
2 changed files with 4 additions and 4 deletions
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue