lumecs 0.0.1

Experimental GUI backed by Bevy ECS + usual suspects
use bevy_ecs::prelude::*;

pub(crate) mod container;
pub(crate) mod text;

#[derive(Component)]
pub struct WidgetNode;

pub trait Widget<'widget, M: Clone + Send + Sync + 'static>: 'widget {
    fn get_children<'a>(&'a self, f: &mut dyn FnMut(&'a (dyn Widget<'widget, M> + 'widget))) {
        let _ = f;
    }

    fn spawn<'a, 'b>(&self, entity_commands: &'a mut EntityWorldMut<'b>)
    where
        'b: 'a;
}

pub mod prelude {
    pub use super::Widget;
    pub use super::container::Container;
    pub use super::container::Root;
    pub use super::text::Text;
}