Crates.io | bevy-progressbar |
lib.rs | bevy-progressbar |
version | 0.8.0 |
source | src |
created_at | 2023-02-01 11:10:05.146641 |
updated_at | 2024-07-05 18:55:28.024029 |
description | Create multi sectons progressbars and use them in the bevy ui |
homepage | |
repository | https://github.com/tecbeast42/bevy-progressbar |
max_upload_size | |
id | 773493 |
size | 326,539 |
Generate progressbars in bevy ui from simple values.
cargo add bevy-progressbar
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.2.1 | 0.9 |
0.3.0 | 0.10 |
0.4.0 | 0.11 |
0.5.0 | 0.12 |
0.6.0 | 0.12 |
0.7.0 | 0.13 |
0.8.0 | 0.14 |