Skip to content

Commit 12d88fa

Browse files
authored
Rename update_ui_context_system (#20532)
# Objective The name of this system is really non-specific and it could be doing anything. ## Solution Rename `update_ui_context_system` to `propagate_ui_target_cameras`.
1 parent f1eb879 commit 12d88fa

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

crates/bevy_ui/src/layout/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ mod tests {
373373

374374
use crate::{
375375
layout::ui_surface::UiSurface, prelude::*, ui_layout_system,
376-
update::update_ui_context_system, ContentSize, LayoutContext,
376+
update::propagate_ui_target_cameras, ContentSize, LayoutContext,
377377
};
378378

379379
// these window dimensions are easy to convert to and from percentage values
@@ -404,7 +404,7 @@ mod tests {
404404
(
405405
// UI is driven by calculated camera target info, so we need to run the camera system first
406406
bevy_render::camera::camera_system,
407-
update_ui_context_system,
407+
propagate_ui_target_cameras,
408408
ApplyDeferred,
409409
ui_layout_system,
410410
mark_dirty_trees,
@@ -417,7 +417,7 @@ mod tests {
417417
app.configure_sets(
418418
PostUpdate,
419419
PropagateSet::<ComputedUiTargetCamera>::default()
420-
.after(update_ui_context_system)
420+
.after(propagate_ui_target_cameras)
421421
.before(ui_layout_system),
422422
);
423423

@@ -1067,7 +1067,7 @@ mod tests {
10671067
(
10681068
// UI is driven by calculated camera target info, so we need to run the camera system first
10691069
bevy_render::camera::camera_system,
1070-
update_ui_context_system,
1070+
propagate_ui_target_cameras,
10711071
ApplyDeferred,
10721072
ui_layout_system,
10731073
)
@@ -1081,7 +1081,7 @@ mod tests {
10811081
app.configure_sets(
10821082
PostUpdate,
10831083
PropagateSet::<ComputedUiTargetCamera>::default()
1084-
.after(update_ui_context_system)
1084+
.after(propagate_ui_target_cameras)
10851085
.before(ui_layout_system),
10861086
);
10871087

crates/bevy_ui/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ use bevy_transform::TransformSystems;
7676
use layout::ui_surface::UiSurface;
7777
use stack::ui_stack_system;
7878
pub use stack::UiStack;
79-
use update::{update_clipping_system, update_ui_context_system};
79+
use update::{propagate_ui_target_cameras, update_clipping_system};
8080

8181
/// The basic plugin for Bevy UI
8282
#[derive(Default)]
@@ -183,7 +183,7 @@ impl Plugin for UiPlugin {
183183
app.add_systems(
184184
PostUpdate,
185185
(
186-
update_ui_context_system.in_set(UiSystems::Prepare),
186+
propagate_ui_target_cameras.in_set(UiSystems::Prepare),
187187
ui_layout_system_config,
188188
ui_stack_system
189189
.in_set(UiSystems::Stack)

crates/bevy_ui/src/update.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ fn update_clipping(
133133
}
134134
}
135135

136-
pub fn update_ui_context_system(
136+
pub fn propagate_ui_target_cameras(
137137
mut commands: Commands,
138138
default_ui_camera: DefaultUiCamera,
139139
ui_scale: Res<UiScale>,
@@ -198,7 +198,7 @@ mod tests {
198198
use bevy_window::WindowResolution;
199199
use bevy_window::WindowScaleFactorChanged;
200200

201-
use crate::update::update_ui_context_system;
201+
use crate::update::propagate_ui_target_cameras;
202202
use crate::ComputedUiTargetCamera;
203203
use crate::IsDefaultUiCamera;
204204
use crate::Node;
@@ -228,7 +228,11 @@ mod tests {
228228

229229
app.add_systems(
230230
bevy_app::Update,
231-
(bevy_render::camera::camera_system, update_ui_context_system).chain(),
231+
(
232+
bevy_render::camera::camera_system,
233+
propagate_ui_target_cameras,
234+
)
235+
.chain(),
232236
);
233237

234238
app
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
2-
title: Renamed `ComputedNodeTarget` to `ComputedUiTargetCamera`
3-
pull_requests: [20519]
2+
title: Renamed `ComputedNodeTarget` and `update_ui_context_system`
3+
pull_requests: [20519, 20532]
44
---
55

6-
Rename `ComputedNodeTarget` to `ComputedUiTargetCamera`. New name chosen because the component's value is derived from `UiTargetCamera`.
6+
`ComputedNodeTarget` has been renamed to `ComputedUiTargetCamera`. New name chosen because the component's value is derived from `UiTargetCamera`.
7+
8+
`update_ui_context_system` has been renamed to `propagate_ui_target_cameras`.

0 commit comments

Comments
 (0)