11 releases (5 breaking)
0.6.0 | Feb 8, 2023 |
---|---|
0.5.0 | Dec 8, 2022 |
0.4.4 | Nov 1, 2022 |
#50 in GUI
2,573 downloads per month
Used in 8 crates
(6 directly)
105KB
514 lines
egui-notify
Simple notifications library for egui
Usage
use egui_notify::Toasts;
use std::time::Duration;
// initialize once
let mut toasts = Toasts::default();
// somewhere within [egui::App::update]...
toasts.info("Hello world!").set_duration(Duration::from_secs(5));
// ...
toasts.show(ctx);
Installation
[dependencies]
egui-notify = "0.4"
Difference to egui-toast
egui-notify
has
- Animations for appearing/disappearing toasts
- Duration meter for expiring toasts
- Toast positioning not influenced by which
Context
you pass to it (like if for example, you passed in aContext
already altered for anegui::Window
) - Differing methodology (create
Toasts
instance once, save save somewhere in application state) - No support for custom toasts
Dependencies
~3–7MB
~106K SLoC