oopsie (orderlerss -> ordered rendering)

This commit is contained in:
2025-11-22 20:22:26 -05:00
parent d757e805e8
commit 90c579d734
10 changed files with 105 additions and 75 deletions

View File

@@ -184,6 +184,18 @@ impl Ui {
}
}
pub fn debug_layers(&self) {
for ((idx, depth), primitives) in self.data.layers.iter_depth() {
let indent = " ".repeat(depth * 2);
let len = primitives.instances().len();
print!("{indent}{idx}: {len} primitives");
if len >= 1 {
print!(" ({})", primitives.instances()[0].binding);
}
println!();
}
}
pub fn window_region<W>(&self, id: &impl IdLike<W>) -> Option<PixelRegion> {
let region = self.data.active.get(&id.id())?.region;
Some(region.to_px(self.data.output_size))