Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Rename the background_color of 'ExtractedUiNode to color` #7452

Closed
Changes from all 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
8 changes: 4 additions & 4 deletions crates/bevy_ui/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ fn get_ui_graph(render_app: &mut App) -> RenderGraph {
pub struct ExtractedUiNode {
pub stack_index: usize,
pub transform: Mat4,
pub background_color: Color,
pub color: Color,
pub rect: Rect,
pub image: Handle<Image>,
pub atlas_size: Option<Vec2>,
Expand Down Expand Up @@ -221,7 +221,7 @@ pub fn extract_uinodes(
extracted_uinodes.uinodes.push(ExtractedUiNode {
stack_index,
transform: transform.compute_matrix(),
background_color: color.0,
color: color.0,
rect: Rect {
min: Vec2::ZERO,
max: uinode.calculated_size,
Expand Down Expand Up @@ -357,7 +357,7 @@ pub fn extract_text_uinodes(
extracted_uinodes.uinodes.push(ExtractedUiNode {
stack_index,
transform: extracted_transform,
background_color: color,
color,
rect,
image: texture,
atlas_size,
Expand Down Expand Up @@ -524,7 +524,7 @@ pub fn prepare_uinodes(
uvs = [uvs[3], uvs[2], uvs[1], uvs[0]];
}

let color = extracted_uinode.background_color.as_linear_rgba_f32();
let color = extracted_uinode.color.as_linear_rgba_f32();
for i in QUAD_INDICES {
ui_meta.vertices.push(UiVertex {
position: positions_clipped[i].into(),
Expand Down