Removed im_str and ImString usage

This commit is contained in:
4bb4 2021-10-03 12:26:08 +02:00
parent f132811e93
commit 4401d696b1
12 changed files with 248 additions and 192 deletions

View file

@ -1,4 +1,4 @@
use imgui::{im_str, Condition, Window};
use imgui::{Condition, Window};
use implot::Context;
// The actual backend-specific code is in this.
@ -22,23 +22,20 @@ fn main() {
demo_state.show_demos(ui, &plot_ui);
}
Window::new(im_str!("Welcome to the ImPlot-rs demo!"))
Window::new("Welcome to the ImPlot-rs demo!")
.size([430.0, 450.0], Condition::FirstUseEver)
.build(ui, || {
ui.checkbox(im_str!("Show C++ ImPlot demo window"), &mut showing_demo);
ui.checkbox(
im_str!("Show Rust ImPlot demo windows"),
&mut showing_rust_demo,
);
ui.checkbox("Show C++ ImPlot demo window", &mut showing_demo);
ui.checkbox("Show Rust ImPlot demo windows", &mut showing_rust_demo);
// TODO(4bb4) ... move windows by default so this is less confusing
ui.text_wrapped(im_str!(
ui.text_wrapped(
"Note that the windows are stacked, so move this one out of the way to see\
the ones beneath it. If you see something in the C++ demo window, but not\
in the Rust ImPlot demo window, that means the bindings are likely not \
implemented yet. Feel free to open an issue if you are missing something \
in particular.
"
));
",
);
});
});
}