Skip to content

Lan-Game-Studios/bevy-progressbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bevy Progressbar

License: MIT Doc Crate Build Status Bevy tracking dependency status

Generate progressbars in bevy ui from simple values.

Preview

Discord

TODO

  • optimize the image creation, by just doing one line and let the gpu use nearst neighbour to scale the texture
  • (optional) render an outline of the progessbar
  • (optional) allow or rounded corners

Features

  • multi section progressbars
  • gpu based shader for rendering

Install

cargo add bevy-progressbar

Usage

See examples for better understanding

fn setup(mut commands: Commands, mut materials: ResMut<Assets<ProgressBarMaterial>>) {
    let bar = ProgressBar::new(vec![(1000, Color::RED),(2000, Color::BLUE),(4000, Color::GREEN)]);
    let style = Style {
        position_type: PositionType::Absolute,
        width: Val::Px(400.0),
        height: Val::Px(200.0),
        top: Val::Px(400.0),
        ..bevy_utils::default()
    };
    commands.spawn(
        ProgressBarBundle::new(style, bar, &mut materials);
    );
}
Version Bevy Version
0.8.0 0.14
0.7.0 0.13
0.6.0 0.12
0.4.0 0.11
0.3.0 0.10
0.2.1 0.9

Lan Game Studios

This crate is part of an effort to crate a game studio. Checkout Mega Giga Cookie Destoryer TD or the mission of Lan Game Studios if you like games or game development.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published