layers initial impl (no sensors)

This commit is contained in:
2025-09-20 00:50:58 -04:00
parent 7651699743
commit 8ecd8bb171
7 changed files with 312 additions and 198 deletions

View File

@@ -6,7 +6,13 @@ pub struct Stack {
impl Widget for Stack {
fn draw(&mut self, painter: &mut Painter) {
let base = painter.layer;
for child in &self.children {
if painter.layer == base {
painter.layer = painter.child_layer();
} else {
painter.layer = painter.next_layer();
}
painter.widget(child);
}
}