bevy_iced 0.1.1

Iced integration for Bevy
Documentation

bevy_iced: use Iced UI programs in your Bevy application

Crates.io MIT/Apache 2.0

Example

use bevy::prelude::*;
use bevy_iced::{
    IcedAppExtensions, IcedPlugin,
    iced::{Program, program::State},
};

#[derive(Default)]
pub struct Ui {
    // Set up your UI state
}

impl Program for Ui {
    // Set up your program logic
}

pub fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugin(IcedPlugin)
        .insert_program(Ui::default())
        .add_system(ui_system)
        .run();
}

pub fn ui_system(mut ui_state: ResMut<State<Ui>>, /* ... */) {
    // Do some work here, then modify your ui state by running
    // ui_state.queue_message(..);
}

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

Todo

  • Multi-window support
  • Bind programs to individual stages

Credits

  • bevy_egui for giving me a useful starting point to do this