1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! # bevy-notify
//!
//! `bevy-notify` is a bevy plugin wrapping [egui_notify](https://crates.io/crates/egui-notify) and
//! adding an event receiver to your bevy app. Toast notifications can then be send
//! in your bevy app at any point.
//! # Examples
//!
//! ```
//! fn main() {
//! App::new()
//! .add_plugins(DefaultPlugins)
//! .add_plugin(NotifyPlugin)
//! .add_plugin(EguiPlugin)
//! .insert_resource(Toasts::default())
//! .add_system(notify_example_system)
//! .run();
//! }
//!
//! fn notify_example_system(key_input: Res<Input<KeyCode>>, mut events: ResMut<Events<Toast>>) {
//! if key_input.just_pressed(KeyCode::Space) {
//! events.send(Toast::success("Space pressed"));
//! }
//! }
//! ```
use ;
use EguiContext;
pub use *;
/// Adds an event resource for Toast nofications to your bevy app.
/// A system is added that will show received toast events through an egui context.
///
/// # Examples
///
/// ```
/// App::new().add_plugin(NotifyPlugin)
/// .add_plugin(EguiPlugin)
/// .insert_resource(Toasts::default());
/// ```
;