This PR adds `PopupCloseBehavior` to improve state of the <https://github.com/emilk/egui/issues/4607> `PopupCloseBehavior` determines when popup will be closed. - `CloseOnClick` popup will be closed if the click happens anywhere even in the popup's body - `CloseOnClickAway` popup will be closed if the click happens somewhere else but in the popup's body. It also adds a test in the demo app which contains several popups examples. --- My ideas about <https://github.com/emilk/egui/issues/4607> is to make every tooltip and popup a menu. So it will provide more control over popups and tooltips (you will be able to close a popup by calling something similar to the `ui.close_menu` if you need to). You won't need to manually handle it's opening. And also will allow to have multiple popups opened. That means you can have a popup inside a popup. And it will also lead to the easier creation of the popups. (should we create a tracking issue to track changes because to me it seems like a huge amount of changes to be done?) --- - Improvements on <https://github.com/emilk/egui/issues/4607> |
||
|---|---|---|
| .. | ||
| confirm_exit | ||
| custom_3d_glow | ||
| custom_font | ||
| custom_font_style | ||
| custom_keypad | ||
| custom_plot_manipulation | ||
| custom_window_frame | ||
| file_dialog | ||
| hello_world | ||
| hello_world_par | ||
| hello_world_simple | ||
| images | ||
| keyboard_events | ||
| multiple_viewports | ||
| popups | ||
| puffin_profiler | ||
| save_plot | ||
| screenshot | ||
| serial_windows | ||
| user_attention | ||
| README.md | ||
| run_all.sh | ||
README.md
egui and eframe examples
All the examples in this folder uses eframe to set up a window for egui. Some examples are specific to eframe, but many are applicable to any egui integration.
There are a lot more examples at https://www.egui.rs, and it has links to the source code of each example.
Also check out the official docs at https://docs.rs/egui and https://docs.rs/eframe.
Note that all the examples on master are for the latest master version of egui.
If you want to look for examples for a specific version of egui, go to that tag, e.g. https://github.com/emilk/egui/tree/latest/examples.