8 unstable releases (3 breaking)

0.4.0 Aug 9, 2023
0.3.1 Aug 3, 2023
0.3.0 Apr 16, 2023
0.2.2 Jan 6, 2023
0.1.1 Jun 6, 2022

#1481 in Game dev

Download history 23/week @ 2024-02-19 8/week @ 2024-02-26 6/week @ 2024-03-11 95/week @ 2024-04-01

95 downloads per month

MIT/Apache

46KB
730 lines

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.11 0.4, master
0.10 0.3,
0.9 0.2
0.7 0.1

Todo

  • Multi-window support
  • Clipboard support

Credits

  • bevy_egui for giving me a useful starting point to do this
  • Joonas Satka for helping me port to Bevy 0.11

Dependencies

~50–88MB
~1.5M SLoC