summaryrefslogtreecommitdiffstats
path: root/native/src/overlay
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/overlay')
-rw-r--r--native/src/overlay/menu.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs
index 8f91e4b7..1ba953f3 100644
--- a/native/src/overlay/menu.rs
+++ b/native/src/overlay/menu.rs
@@ -233,6 +233,16 @@ where
)
}
+ fn mouse_interaction(
+ &self,
+ layout: Layout<'_>,
+ viewport: &Rectangle,
+ cursor_position: Point,
+ ) -> mouse::Interaction {
+ self.container
+ .mouse_interaction(layout, viewport, cursor_position)
+ }
+
fn draw(
&self,
renderer: &mut Renderer,
@@ -374,6 +384,21 @@ where
event::Status::Ignored
}
+ fn mouse_interaction(
+ &self,
+ layout: Layout<'_>,
+ _viewport: &Rectangle,
+ cursor_position: Point,
+ ) -> mouse::Interaction {
+ let is_mouse_over = layout.bounds().contains(cursor_position);
+
+ if is_mouse_over {
+ mouse::Interaction::Pointer
+ } else {
+ mouse::Interaction::default()
+ }
+ }
+
fn draw(
&self,
renderer: &mut Renderer,