9个不稳定版本
0.5.0 | 2024年7月1日 |
---|---|
0.4.0 | 2023年8月9日 |
0.3.1 | 2023年8月3日 |
0.3.0 | 2023年4月16日 |
0.1.1 | 2022年6月6日 |
#1152 in 游戏开发
每月下载量 87次
59KB
905 代码行
bevy_iced
: 在你的 Bevy 应用程序中使用 Iced UI程序
示例
use bevy::prelude::*;
use bevy_iced::iced::widget::text;
use bevy_iced::{IcedContext, IcedPlugin};
#[derive(Event)]
pub enum UiMessage {}
pub fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(IcedPlugin::default())
.add_event::<UiMessage>()
.add_systems(Update, ui_system)
.run();
}
fn ui_system(time: Res<Time>, mut ctx: IcedContext<UiMessage>) {
ctx.display(text(format!(
"Hello Iced! Running for {:.2} seconds.",
time.elapsed_seconds()
)));
}
兼容性
Bevy版本 | crate版本 |
---|---|
0.13 |
0.5 , master |
0.11 |
0.4 |
0.10 |
0.3 |
0.9 |
0.2 |
0.7 |
0.1 |
待办事项
- 多窗口支持
- 剪贴板支持
致谢
bevy_egui
为我提供了有用的起点- Joonas Satka 帮助我将代码移植到Bevy 0.11
- Tomas Zemanovic 和 Julia Naomi 帮助我将代码移植到Bevy 0.13
依赖项
~50–87MB
~1.5M SLoC