Open SDesya74 opened 1 year ago
this one is a bit difficult. i can lock focus to a dummy null Id
or surrender focus from all widgets, but this will prevent textboxes and other certain widgets that need focus from working in the modal. i dont think egui exposes enough api for me to do this simply. if there was a way to set this line and this line to false
every frame, it would make it really easy...
Yesterday I was just looking at how it works in egui, also decided that the api provided is not enough. It would be nice to make some kind of general solution to bound the focus within the widget and all its children, but I still have absolutely no idea how to do it with current egui api.
Thank you very much for the answer, I will try to study this topic, and if I come up with something, I will make a pull request
thanks!
When a modal window is open, the user should not be able to interact with elements outside of this window.
Reproducing:
cargo run --example example