20 个版本 (破坏性)
| 0.15.0 | 2024年7月10日 |
|---|---|
| 0.14.0 | 2024年3月27日 |
| 0.13.0 | 2024年2月7日 |
| 0.11.0 | 2023年11月23日 |
| 0.4.4 | 2022年11月1日 |
#74 in GUI
每月2,916次下载
在 9 crates 中使用
105KB
567 代码行
egui-notify
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!").set_duration(Duration::from_secs(5));
// ...
toasts.show(ctx);
安装
[dependencies]
egui-notify = "0.10"
与 egui-toast 的区别
egui-notify 有
- 出现/消失提示的动画
- 过期提示的持续时间测量器
- 提示位置不受传递的
Context的影响(例如,如果传递了一个已为Window更改过的Context) - 不同的方法(创建
Toasts实例一次,保存在应用程序状态中的某个地方) - 线程安全的
Toasts实例,实现了Send,Sync。 - 不支持自定义提示
依赖
~4.5–10MB
~82K SLoC