Use visible bounds to determine hit bounds for cursor/mouse regions

This commit is contained in:
Antonio Scandurra 2022-06-08 10:17:22 +02:00
parent 5c84f4b92c
commit a26af194e7
4 changed files with 18 additions and 11 deletions

View file

@ -250,11 +250,15 @@ impl Scene {
}
pub fn push_cursor_region(&mut self, region: CursorRegion) {
self.active_layer().push_cursor_region(region);
if can_draw(region.bounds) {
self.active_layer().push_cursor_region(region);
}
}
pub fn push_mouse_region(&mut self, region: MouseRegion) {
self.active_layer().push_mouse_region(region);
if can_draw(region.bounds) {
self.active_layer().push_mouse_region(region);
}
}
pub fn push_image(&mut self, image: Image) {