bevy/crates/bevy_ui/src
ickshonpe a949867a1c
UI z-ordering fix (#19691)
# Objective

During the migration to required components a lot of things were changed
around and somehow the draw order for some UI elements ended up
depending on the system ordering in `RenderSystems::Queue`, which can
sometimes result in the elements being drawn in the wrong order.

Fixes #19674

## Solution

* Added some more `stack_z_offsets` constants and used them to enforce
an explicit ordering.
* Removed the `stack_index: u32` field from `ExtractedUiNodes` and
replaced it with a `z_order: f32` field.

These changes should fix all the ordering problems. 

## Testing

I added a nine-patched bordered node with a navy background color to the
slice section of the `testbed_ui` example.
The border should always be drawn above the background color.
2025-07-01 19:20:07 +00:00
..
experimental Switch ChildOf back to tuple struct (#18672) 2025-04-02 00:10:10 +00:00
layout Newtyped ScrollPosition (#19881) 2025-07-01 17:41:48 +00:00
render UI z-ordering fix (#19691) 2025-07-01 19:20:07 +00:00
widget Move TextShadow to text widget module (#19579) 2025-06-29 17:37:04 +00:00
accessibility.rs Specialized UI transform (#16615) 2025-06-09 19:05:49 +00:00
focus.rs bevy_ui compilation (#19858) 2025-06-29 17:12:11 +00:00
geometry.rs Rename Position to UiPosition in bevy_ui (#19422) 2025-05-29 14:52:44 +00:00
gradients.rs Color interpolation in OKLab, OKLCH spaces for UI gradients (#19330) 2025-06-21 15:06:35 +00:00
interaction_states.rs Core Checkbox (#19665) 2025-06-20 16:37:18 +00:00
lib.rs Move TextShadow to text widget module (#19579) 2025-06-29 17:37:04 +00:00
measurement.rs Use CosmicFontSystem in public bevy_text APIs and remove cosmic_text re-export (#16063) 2024-10-23 20:05:28 +00:00
picking_backend.rs Fix ui picking outside the viewport (#19744) 2025-06-30 22:46:56 +00:00
stack.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
ui_material.rs Type erased materials (#19667) 2025-06-27 22:57:24 +00:00
ui_node.rs Newtyped ScrollPosition (#19881) 2025-07-01 17:41:48 +00:00
ui_transform.rs Specialized UI transform (#16615) 2025-06-09 19:05:49 +00:00
update.rs Opt-out for UI clipping (#19826) 2025-06-27 17:17:09 +00:00