This PR is a continuation of #4915 by @frederik-uni and @lucasmerlin that introduces support for keeping egui content within the 'safe area' on iOS (avoiding the notch / dynamic island / menu bar etc.), with the following changes: - `SafeArea` now wraps `MarginF32` and has been renamed to `SafeAreaInsets` to clarify its purpose. - `InputState::screen_rect` is now marked as deprecated in favour of either `viewport_rect` (which contains the entire screen), or `content_rect` (which is the viewport rect with the safe area insets removed). - I added some comments to the safe area insets logic pointing out the [safe area API coming in winit v0.31](https://github.com/rust-windowing/winit/issues/3910). --------- Co-authored-by: frederik-uni <147479464+frederik-uni@users.noreply.github.com> Co-authored-by: Lucas Meurer <hi@lucasmerlin.me> Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> |
||
|---|---|---|
| .. | ||
| confirm_exit | ||
| custom_3d_glow | ||
| custom_font | ||
| custom_font_style | ||
| custom_keypad | ||
| custom_style | ||
| custom_window_frame | ||
| external_eventloop | ||
| external_eventloop_async | ||
| file_dialog | ||
| hello_android | ||
| hello_world | ||
| hello_world_par | ||
| hello_world_simple | ||
| images | ||
| keyboard_events | ||
| multiple_viewports | ||
| popups | ||
| puffin_profiler | ||
| 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 main are for the latest main 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.