This commit is contained in:
2025-11-11 13:55:36 -05:00
parent 92db1264a6
commit deaf730901
9 changed files with 87 additions and 3 deletions

View File

@@ -170,6 +170,19 @@ impl Ui {
font_system: &mut self.data.text.font_system,
}
}
pub fn debug(&self, label: &str) {
for (id, inst) in &self.data.active {
let l = &self.data.widgets.data(id).unwrap().label;
if l != label {
continue;
}
println!("\"{label}\" {{");
println!(" region: {}", inst.region);
println!(" desired_size: {}", inst.desired_size);
println!("}}");
}
}
}
impl<W: Widget> Index<&WidgetId<W>> for Ui {