egui-notify

Crates.ioegui-notify
lib.rsegui-notify
version0.17.0
sourcesrc
created_at2022-08-22 21:52:39.214455
updated_at2024-10-17 12:19:13.329275
descriptionSimple notifications library for egui
homepage
repositoryhttps://github.com/ItsEthra/egui-notify
max_upload_size
id650619
size180,530
Ethra (ItsEthra)

documentation

README

egui-notify

Simple notifications library for egui

example_image

example_video

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!").duration(Duration::from_secs(5));
// ...
toasts.show(ctx);

Installation

cargo add egui-notify
[dependencies]
egui-notify = "0.17.0"

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 a Context already altered for an egui::Window)
  • Differing methodology (create Toasts instance once, save save somewhere in application state)
  • Threadsafe Toasts instance, implements Send, Sync.
  • No support for custom toasts
Commit count: 114

cargo fmt