diff --git a/crates/egui/src/containers/area.rs b/crates/egui/src/containers/area.rs index f3a66cddd03..0f764dd4b84 100644 --- a/crates/egui/src/containers/area.rs +++ b/crates/egui/src/containers/area.rs @@ -172,7 +172,10 @@ impl Area { } /// If false, clicks goes straight through to what is behind us. - /// Good for tooltips etc. + /// + /// Can be used for semi-invisible areas that the user should be able to click through. + /// + /// Default: `true`. #[inline] pub fn interactable(mut self, interactable: bool) -> Self { self.interactable = interactable; diff --git a/crates/egui/src/containers/popup.rs b/crates/egui/src/containers/popup.rs index a196830d509..5f4a9d6203a 100644 --- a/crates/egui/src/containers/popup.rs +++ b/crates/egui/src/containers/popup.rs @@ -136,7 +136,7 @@ fn show_tooltip_at_avoid_dyn<'c, R>( .pivot(pivot) .fixed_pos(anchor) .default_width(ctx.style().spacing.tooltip_width) - .interactable(false) // Only affects the actual area, i.e. clicking and dragging it. The content can still be interactive. + .sense(Sense::hover()) // don't click to bring to front .show(ctx, |ui| { // By default the text in tooltips aren't selectable. // This means that most tooltips aren't interactable, diff --git a/crates/egui/src/containers/window.rs b/crates/egui/src/containers/window.rs index f2d5c33a2c2..0c8847ae0c7 100644 --- a/crates/egui/src/containers/window.rs +++ b/crates/egui/src/containers/window.rs @@ -92,7 +92,11 @@ impl<'open> Window<'open> { self } - /// If `false` the window will be non-interactive. + /// If false, clicks goes straight through to what is behind us. + /// + /// Can be used for semi-invisible areas that the user should be able to click through. + /// + /// Default: `true`. #[inline] pub fn interactable(mut self, interactable: bool) -> Self { self.area = self.area.interactable(interactable); diff --git a/crates/egui/src/menu.rs b/crates/egui/src/menu.rs index e38c7d062b0..01c3e2bf213 100644 --- a/crates/egui/src/menu.rs +++ b/crates/egui/src/menu.rs @@ -149,7 +149,6 @@ fn menu_popup<'c, R>( .kind(UiKind::Menu) .order(Order::Foreground) .fixed_pos(pos) - .interactable(true) .default_width(ctx.style().spacing.menu_width) .sense(Sense::hover());