egui/examples/user_attention
TicClick e3a021eea6
Allow for requesting the user's attention to the window (#2905)
* add method for requesting attention to the main window

* use another enum member for user attention type instead of nested `Option`s

(also, document the enum members now that they don't mirror `winit`)

* update the docstring

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* add an example app for testing window attention requests

* Apply suggestions from code review

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* remove `chrono` dependency and improve the attention example's readability

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-04-19 15:29:17 +02:00
..
src Allow for requesting the user's attention to the window (#2905) 2023-04-19 15:29:17 +02:00
Cargo.toml Allow for requesting the user's attention to the window (#2905) 2023-04-19 15:29:17 +02:00
README.mg Allow for requesting the user's attention to the window (#2905) 2023-04-19 15:29:17 +02:00
screenshot.png Allow for requesting the user's attention to the window (#2905) 2023-04-19 15:29:17 +02:00

README.mg

An example of requesting a user's attention to the main window, and resetting the ongoing attention animations when necessary. Only works on native platforms.

```sh
cargo run -p user_attention
```

![](screenshot.png)