bevy/crates/bevy_ui/src
Rob Parrett 26ecfcff43
Fix UI borders (#10078)
# Objective

Fixes #10069

## Solution

Extracted UI nodes were previously stored in a `SparseSet` and had a
predictable iteration order. UI borders and outlines relied on this. Now
they are stored in a HashMap and that is no longer true.

This adds `entity.index()` to the sort key for `TransparentUi` so that
the iteration order is predictable and the "border entities" that get
spawned during extraction are guaranteed to get drawn after their
respective container nodes again.

I **think** that everything still works for overlapping ui nodes etc,
because the z value / primary sort is still controlled by the "ui
stack."

Text above is just my current understanding. A rendering expert should
check this out.

I will do some more testing when I can.
2023-10-13 17:17:16 +00:00
..
layout UI node outlines (#9931) 2023-10-05 12:10:32 +00:00
render Fix UI borders (#10078) 2023-10-13 17:17:16 +00:00
widget Store both the rounded and unrounded node size in Node (#9923) 2023-09-28 22:42:13 +00:00
accessibility.rs Various accessibility API updates. (#9989) 2023-10-02 21:22:52 +00:00
camera_config.rs bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
focus.rs Fix the clippy::explicit_iter_loop lint (#9834) 2023-09-19 03:35:22 +00:00
geometry.rs Derive Serialize and Deserialize for UiRect (#9820) 2023-09-15 19:51:57 +00:00
lib.rs UI node outlines (#9931) 2023-10-05 12:10:32 +00:00
measurement.rs Change the default for the measure_func field of ContentSize to None. (#9346) 2023-08-07 23:06:40 +00:00
node_bundles.rs Add link to Text2dBundle in TextBundle docs. (#9900) 2023-09-25 20:33:42 +00:00
stack.rs Fix typos throughout the project (#9090) 2023-07-10 00:11:51 +00:00
ui_node.rs Implement serialize and deserialize for some UI types (#10044) 2023-10-10 18:52:48 +00:00
update.rs Do not panic on non-UI child of UI entity (#9621) 2023-08-29 10:49:40 +00:00