Struct me3_framework::overlay::widgets::ProgressBar
source · [−]pub struct ProgressBar { /* private fields */ }
Expand description
A simple progress bar.
See also: crate::Spinner
.
Implementations
sourceimpl ProgressBar
impl ProgressBar
sourcepub fn new(progress: f32) -> ProgressBar
pub fn new(progress: f32) -> ProgressBar
Progress in the [0, 1]
range, where 1
means “completed”.
sourcepub fn desired_width(self, desired_width: f32) -> ProgressBar
pub fn desired_width(self, desired_width: f32) -> ProgressBar
The desired width of the bar. Will use all horizontal space if not set.
sourcepub fn text(self, text: impl Into<WidgetText>) -> ProgressBar
pub fn text(self, text: impl Into<WidgetText>) -> ProgressBar
A custom text to display on the progress bar.
sourcepub fn show_percentage(self) -> ProgressBar
pub fn show_percentage(self) -> ProgressBar
Show the progress in percent on the progress bar.
sourcepub fn animate(self, animate: bool) -> ProgressBar
pub fn animate(self, animate: bool) -> ProgressBar
Whether to display a loading animation when progress < 1
.
Note that this will cause the UI to be redrawn.
Defaults to false
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ProgressBar
impl Send for ProgressBar
impl Sync for ProgressBar
impl Unpin for ProgressBar
impl UnwindSafe for ProgressBar
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more