Introduce internal overlay::Nested for UserInterface
This commit is contained in:
parent
329fbc7b21
commit
55dc3b5619
9 changed files with 406 additions and 41 deletions
|
|
@ -147,11 +147,18 @@ where
|
|||
});
|
||||
}
|
||||
|
||||
fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
|
||||
fn is_over(
|
||||
&self,
|
||||
layout: Layout<'_>,
|
||||
renderer: &Renderer,
|
||||
cursor_position: Point,
|
||||
) -> bool {
|
||||
self.children
|
||||
.iter()
|
||||
.zip(layout.children())
|
||||
.any(|(child, layout)| child.is_over(layout, cursor_position))
|
||||
.any(|(child, layout)| {
|
||||
child.is_over(layout, renderer, cursor_position)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue