bevy-progressbar 0.1.0

Create multi sectons progressbars and use them in the bevy ui
Documentation
bevy-progressbar-0.1.0 has been yanked.

Bevy Progressbar

Generate progressbars in bevy ui from simple values. The progressbars can have multiple sections.

Install

cargo add bevy-progressbar

Usage

See examples for better understanding

fn setup(mut commands: Commands, mut images: ResMut<Assets<Image>>) {
    commands.spawn(
        // progressbar size, width, height
        ProgressBarBundle::new(10_000, 1000, 100, &mut images)
            .add_section(1000, Color::RED)
            .add_section(2000, Color::BLUE)
            .add_section(4000, Color::GREEN),

        ProgressBarBundle::new(10_000, 1000, 100, &mut images)
            .add_section(1000, Color::RED)
            .add_section(2000, Color::BLUE)
            .add_section(4000, Color::GREEN),
    );
}

TODO

  • optimize the image creation, by just doing one line and let the gpu use nearst neighbour to scale the texture