bevy_iced

Crates.iobevy_iced
lib.rsbevy_iced
version0.5.0
sourcesrc
created_at2022-06-06 05:08:49.064633
updated_at2024-07-01 08:08:20.649051
descriptionIced integration for Bevy
homepagehttps://github.com/tasgon/bevy_iced
repositoryhttps://github.com/tasgon/bevy_iced
max_upload_size
id600483
size190,210
M (tasgon)

documentation

https://docs.rs/bevy_iced

README

bevy_iced: use Iced UI programs in your Bevy application

Crates.io MIT/Apache 2.0

Example

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()
    )));
}

See the examples and the documentation for more details on how to use the crate.

Compatibility

Bevy Version Crate Version
0.13 0.5, master
0.11 0.4
0.10 0.3
0.9 0.2
0.7 0.1

Todo

  • Multi-window support
  • Clipboard support

Credits

Commit count: 94

cargo fmt