layers initial impl (no sensors)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user