Move bevy_ui accessibility systems to PostUpdate. (#8653)
# Objective `bevy_ui` accessibility updates are probably more correctly done in `PostUpdate`. ## Solution Move `bevy_ui` accessibility updates to `PostUpdate`. --------- Co-authored-by: ickshonpe <david.curthoys@googlemail.com>
This commit is contained in:
parent
df3e81c1fb
commit
897daa0ad6
@ -6,10 +6,11 @@ use bevy_a11y::{
|
|||||||
accesskit::{NodeBuilder, Rect, Role},
|
accesskit::{NodeBuilder, Rect, Role},
|
||||||
AccessibilityNode,
|
AccessibilityNode,
|
||||||
};
|
};
|
||||||
use bevy_app::{App, Plugin, Update};
|
use bevy_app::{App, Plugin, PostUpdate};
|
||||||
use bevy_ecs::{
|
use bevy_ecs::{
|
||||||
prelude::{DetectChanges, Entity},
|
prelude::{DetectChanges, Entity},
|
||||||
query::{Changed, Without},
|
query::{Changed, Without},
|
||||||
|
schedule::IntoSystemConfigs,
|
||||||
system::{Commands, Query},
|
system::{Commands, Query},
|
||||||
world::Ref,
|
world::Ref,
|
||||||
};
|
};
|
||||||
@ -147,8 +148,13 @@ pub(crate) struct AccessibilityPlugin;
|
|||||||
impl Plugin for AccessibilityPlugin {
|
impl Plugin for AccessibilityPlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
app.add_systems(
|
app.add_systems(
|
||||||
Update,
|
PostUpdate,
|
||||||
(calc_bounds, button_changed, image_changed, label_changed),
|
(
|
||||||
|
calc_bounds.after(bevy_transform::TransformSystem::TransformPropagate),
|
||||||
|
button_changed,
|
||||||
|
image_changed,
|
||||||
|
label_changed,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@ use bevy_a11y::{
|
|||||||
accesskit::{ActionHandler, ActionRequest, NodeBuilder, NodeClassSet, Role, TreeUpdate},
|
accesskit::{ActionHandler, ActionRequest, NodeBuilder, NodeClassSet, Role, TreeUpdate},
|
||||||
AccessKitEntityExt, AccessibilityNode, AccessibilityRequested, Focus,
|
AccessKitEntityExt, AccessibilityNode, AccessibilityRequested, Focus,
|
||||||
};
|
};
|
||||||
use bevy_app::{App, Plugin, Update};
|
use bevy_app::{App, Plugin, PostUpdate};
|
||||||
use bevy_derive::{Deref, DerefMut};
|
use bevy_derive::{Deref, DerefMut};
|
||||||
use bevy_ecs::{
|
use bevy_ecs::{
|
||||||
prelude::{DetectChanges, Entity, EventReader, EventWriter},
|
prelude::{DetectChanges, Entity, EventReader, EventWriter},
|
||||||
@ -166,7 +166,7 @@ impl Plugin for AccessibilityPlugin {
|
|||||||
.init_resource::<WinitActionHandlers>()
|
.init_resource::<WinitActionHandlers>()
|
||||||
.add_event::<ActionRequest>()
|
.add_event::<ActionRequest>()
|
||||||
.add_systems(
|
.add_systems(
|
||||||
Update,
|
PostUpdate,
|
||||||
(
|
(
|
||||||
handle_window_focus,
|
handle_window_focus,
|
||||||
window_closed,
|
window_closed,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user