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

Fix UI borders #10078

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion crates/bevy_ui/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,10 @@ pub fn queue_uinodes(
draw_function,
pipeline,
entity: *entity,
sort_key: FloatOrd(extracted_uinode.stack_index as f32),
sort_key: (
FloatOrd(extracted_uinode.stack_index as f32),
entity.index(),
),
// batch_range will be calculated in prepare_uinodes
batch_range: 0..0,
dynamic_offset: None,
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ui/src/render/render_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl Node for UiPassNode {
}

pub struct TransparentUi {
pub sort_key: FloatOrd,
pub sort_key: (FloatOrd, u32),
pub entity: Entity,
pub pipeline: CachedRenderPipelineId,
pub draw_function: DrawFunctionId,
Expand All @@ -97,7 +97,7 @@ pub struct TransparentUi {
}

impl PhaseItem for TransparentUi {
type SortKey = FloatOrd;
type SortKey = (FloatOrd, u32);

#[inline]
fn entity(&self) -> Entity {
Expand Down