Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions crates/bevy_ui/src/layout/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ mod tests {

use crate::{
layout::ui_surface::UiSurface, prelude::*, ui_layout_system,
update::update_ui_context_system, ContentSize, LayoutContext,
update::propagate_ui_target_camera_system, ContentSize, LayoutContext,
};

// these window dimensions are easy to convert to and from percentage values
Expand Down Expand Up @@ -404,7 +404,7 @@ mod tests {
(
// UI is driven by calculated camera target info, so we need to run the camera system first
bevy_render::camera::camera_system,
update_ui_context_system,
propagate_ui_target_camera_system,
ApplyDeferred,
ui_layout_system,
mark_dirty_trees,
Expand All @@ -417,7 +417,7 @@ mod tests {
app.configure_sets(
PostUpdate,
PropagateSet::<ComputedUiTargetCamera>::default()
.after(update_ui_context_system)
.after(propagate_ui_target_camera_system)
.before(ui_layout_system),
);

Expand Down Expand Up @@ -1067,7 +1067,7 @@ mod tests {
(
// UI is driven by calculated camera target info, so we need to run the camera system first
bevy_render::camera::camera_system,
update_ui_context_system,
propagate_ui_target_camera_system,
ApplyDeferred,
ui_layout_system,
)
Expand All @@ -1081,7 +1081,7 @@ mod tests {
app.configure_sets(
PostUpdate,
PropagateSet::<ComputedUiTargetCamera>::default()
.after(update_ui_context_system)
.after(propagate_ui_target_camera_system)
.before(ui_layout_system),
);

Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ use bevy_transform::TransformSystems;
use layout::ui_surface::UiSurface;
use stack::ui_stack_system;
pub use stack::UiStack;
use update::{update_clipping_system, update_ui_context_system};
use update::{propagate_ui_target_camera_system, update_clipping_system};

/// The basic plugin for Bevy UI
#[derive(Default)]
Expand Down Expand Up @@ -183,7 +183,7 @@ impl Plugin for UiPlugin {
app.add_systems(
PostUpdate,
(
update_ui_context_system.in_set(UiSystems::Prepare),
propagate_ui_target_camera_system.in_set(UiSystems::Prepare),
ui_layout_system_config,
ui_stack_system
.in_set(UiSystems::Stack)
Expand Down
10 changes: 7 additions & 3 deletions crates/bevy_ui/src/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fn update_clipping(
}
}

pub fn update_ui_context_system(
pub fn propagate_ui_target_camera_system(
mut commands: Commands,
default_ui_camera: DefaultUiCamera,
ui_scale: Res<UiScale>,
Expand Down Expand Up @@ -198,7 +198,7 @@ mod tests {
use bevy_window::WindowResolution;
use bevy_window::WindowScaleFactorChanged;

use crate::update::update_ui_context_system;
use crate::update::propagate_ui_target_camera_system;
use crate::ComputedUiTargetCamera;
use crate::IsDefaultUiCamera;
use crate::Node;
Expand Down Expand Up @@ -228,7 +228,11 @@ mod tests {

app.add_systems(
bevy_app::Update,
(bevy_render::camera::camera_system, update_ui_context_system).chain(),
(
bevy_render::camera::camera_system,
propagate_ui_target_camera_system,
)
.chain(),
);

app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: Renamed `ComputedNodeTarget` to `ComputedUiTargetCamera`
pull_requests: [20519]
title: Renamed `ComputedNodeTarget` and `update_ui_context_system`
pull_requests: [20519, 20532]
---

Rename `ComputedNodeTarget` to `ComputedUiTargetCamera`. New name chosen because the component's value is derived from `UiTargetCamera`.
`ComputedNodeTarget` has been renamed to `ComputedUiTargetCamera`. New name chosen because the component's value is derived from `UiTargetCamera`.

`update_ui_context_system` has been renamed to `propagate_ui_target_camera_system`.
Loading