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},
|
||||
AccessibilityNode,
|
||||
};
|
||||
use bevy_app::{App, Plugin, Update};
|
||||
use bevy_app::{App, Plugin, PostUpdate};
|
||||
use bevy_ecs::{
|
||||
prelude::{DetectChanges, Entity},
|
||||
query::{Changed, Without},
|
||||
schedule::IntoSystemConfigs,
|
||||
system::{Commands, Query},
|
||||
world::Ref,
|
||||
};
|
||||
@ -147,8 +148,13 @@ pub(crate) struct AccessibilityPlugin;
|
||||
impl Plugin for AccessibilityPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.add_systems(
|
||||
Update,
|
||||
(calc_bounds, button_changed, image_changed, label_changed),
|
||||
PostUpdate,
|
||||
(
|
||||
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},
|
||||
AccessKitEntityExt, AccessibilityNode, AccessibilityRequested, Focus,
|
||||
};
|
||||
use bevy_app::{App, Plugin, Update};
|
||||
use bevy_app::{App, Plugin, PostUpdate};
|
||||
use bevy_derive::{Deref, DerefMut};
|
||||
use bevy_ecs::{
|
||||
prelude::{DetectChanges, Entity, EventReader, EventWriter},
|
||||
@ -166,7 +166,7 @@ impl Plugin for AccessibilityPlugin {
|
||||
.init_resource::<WinitActionHandlers>()
|
||||
.add_event::<ActionRequest>()
|
||||
.add_systems(
|
||||
Update,
|
||||
PostUpdate,
|
||||
(
|
||||
handle_window_focus,
|
||||
window_closed,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user