This commit is contained in:
2026-03-20 20:28:48 -04:00
parent f71e03317d
commit d79a3bb728
9 changed files with 702 additions and 52 deletions

View File

@@ -44,6 +44,13 @@ impl Rect {
size: UiSize::new(width, height),
}
}
pub fn contains(self, point: Point) -> bool {
point.x >= self.origin.x
&& point.y >= self.origin.y
&& point.x < self.origin.x + self.size.width
&& point.y < self.origin.y + self.size.height
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]