Reflected traits for resources and components: bevy_a11y (#15192)

Solves https://github.com/bevyengine/bevy/issues/15187 for the bevy_a11y
subcrate.
This commit is contained in:
Blazepaws 2024-09-14 03:43:16 +02:00 committed by GitHub
parent cf55e6cb22
commit 583e034796
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,6 +21,7 @@ use bevy_ecs::{
schedule::SystemSet,
system::Resource,
};
use bevy_reflect::std_traits::ReflectDefault;
use bevy_reflect::Reflect;
/// Wrapper struct for [`accesskit::ActionRequest`]. Required to allow it to be used as an `Event`.
@ -94,7 +95,7 @@ impl From<NodeBuilder> for AccessibilityNode {
/// Resource representing which entity has keyboard focus, if any.
#[derive(Resource, Default, Deref, DerefMut, Reflect)]
#[reflect(Resource)]
#[reflect(Resource, Default)]
pub struct Focus(pub Option<Entity>);
/// Set enum for the systems relating to accessibility