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
					
				@ -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 New Issue
	
	Block a user