Closed cole21771 closed 1 year ago
You can use is_pointer_over_area
to see if the pointer is over any egui window.
https://github.com/aevyrie/bevy_mod_picking/blob/554649a951689dce66d0d759839b326874e8826f/backends/bevy_picking_egui/src/lib.rs#L72
Thank you! That worked exactly as I had hoped with this simple code
let hovering_over_egui = egui_context.ctx_for_window_mut(WindowId::default()).is_pointer_over_area();
A part of my game involves doing something on clicking anywhere in the game.
However, clicks on the egui inspector window count as clicks in the game and are caught by my clicking system. I'd love to find a way to exclude clicks within the window from getting picked up by that system.
I thought maybe I could get the coordinates of the window and it's size and do some filtering myself with basic math, but I haven't been able to find a way to get the egui window coords or window size created by the InspectorPlugin. Am I missing something or is there no way to get that data?