Crates.io | egui-notify |
lib.rs | egui-notify |
version | 0.17.0 |
source | src |
created_at | 2022-08-22 21:52:39.214455 |
updated_at | 2024-10-17 12:19:13.329275 |
description | Simple notifications library for egui |
homepage | |
repository | https://github.com/ItsEthra/egui-notify |
max_upload_size | |
id | 650619 |
size | 180,530 |
Simple notifications library for egui
use egui_notify::Toasts;
use std::time::Duration;
// initialize once
let mut toasts = Toasts::default();
// somewhere within [egui::App::update]...
toasts.info("Hello world!").duration(Duration::from_secs(5));
// ...
toasts.show(ctx);
cargo add egui-notify
[dependencies]
egui-notify = "0.17.0"
egui-toast
egui-notify
hasContext
you pass to it (like if for example, you passed in a Context
already altered for an egui::Window
)Toasts
instance once, save save somewhere in application state)Toasts
instance, implements Send
, Sync
.