mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-10 04:58:34 +00:00
26 lines
748 B
Rust
26 lines
748 B
Rust
use imgui::*;
|
|
|
|
mod support;
|
|
|
|
fn main() {
|
|
support::simple_init(file!(), move |run, ui| {
|
|
let w = ui
|
|
.window("Progress bar")
|
|
.opened(run)
|
|
.position([20.0, 20.0], Condition::Appearing)
|
|
.size([700.0, 200.0], Condition::Appearing);
|
|
w.build(|| {
|
|
ui.text("This is a simple progress bar:");
|
|
ProgressBar::new(0.5).build(ui);
|
|
|
|
ui.separator();
|
|
ui.text("This progress bar has a custom size:");
|
|
ProgressBar::new(0.3).size([200.0, 50.0]).build(ui);
|
|
|
|
ui.separator();
|
|
ui.text("This progress bar uses overlay text:");
|
|
ProgressBar::new(0.8).overlay_text("Lorem ipsum").build(ui);
|
|
});
|
|
});
|
|
}
|