Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress bar #519

Merged
merged 9 commits into from
Jul 1, 2021
Merged
Prev Previous commit
Next Next commit
Update egui/src/widgets/progress_bar.rs
Co-authored-by: Emil Ernerfeldt <[email protected]>
  • Loading branch information
EmbersArc and emilk committed Jun 28, 2021
commit 24e6fbe4c874b2c070d06b0abcf74f8829e0b8aa
1 change: 1 addition & 0 deletions egui/src/widgets/progress_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub struct ProgressBar {
}

impl ProgressBar {
/// Progress in the `[0, 1]` range, where `1` means "completed".
pub fn new(progress: f32) -> Self {
EmbersArc marked this conversation as resolved.
Show resolved Hide resolved
Self {
progress: progress.clamp(0.0, 1.0),
Expand Down