-
Hi, I am trying to show small dialog using egui::Window(). But events on my dialog go through underlying main window too. How to avoid this? I prepared a small example tweaking hello_world example: https://github.com/ruimo/egui-dialog-test.git It shows a small dialog on top of main window. When you move mouse cursor, it prints "mouse move" events that reach to underlying main window. It prints events even if the mouse cursor is on the dialog. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Clicks shouldn't go through windows, If you want to know if the pointer is in a |
Beta Was this translation helpful? Give feedback.
Clicks shouldn't go through windows,
ui.input()
is just short forui.ctx().input()
, and so shows all input to all of egui.If you want to know if the pointer is in a
Ui
, use https://docs.rs/egui/latest/egui/struct.Ui.html#method.ui_contains_pointer