Skip to content

Commit

Permalink
Fix borders
Browse files Browse the repository at this point in the history
  • Loading branch information
rparrett committed Oct 10, 2023
1 parent 665dbcb commit ede8928
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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

0 comments on commit ede8928

Please sign in to comment.