fixed formatting problems

This commit is contained in:
Jack Mac 2021-09-12 17:20:21 -04:00
parent f635fd6438
commit 8037ca9e82
2 changed files with 12 additions and 14 deletions

View File

@ -114,7 +114,7 @@ fn example_2(ui: &Ui) {
ui.separator();
ui.text_wrapped(
"ColorPreview::Alpha uses a checkerboard pattern in the entire color area to \
illustrate the alpha component"
illustrate the alpha component",
);
ColorButton::new("Red + ColorPreview::Alpha", [1.0, 0.0, 0.0, 0.5])
.preview(ColorPreview::Alpha)

View File

@ -19,18 +19,16 @@ fn main() {
.reload_font_texture(&mut system.imgui)
.expect("Failed to reload fonts");
system.main_loop(move |run, ui| {
Window::new("Hello world")
.opened(run)
.build(ui, || {
ui.text("Hello, I'm the default font!");
let _roboto = ui.push_font(roboto);
ui.text("Hello, I'm Roboto Regular!");
let _dokdo = ui.push_font(dokdo);
ui.text("Hello, I'm Dokdo Regular!");
_dokdo.pop();
ui.text("Hello, I'm Roboto Regular again!");
_roboto.pop();
ui.text("Hello, I'm the default font again!");
});
Window::new("Hello world").opened(run).build(ui, || {
ui.text("Hello, I'm the default font!");
let _roboto = ui.push_font(roboto);
ui.text("Hello, I'm Roboto Regular!");
let _dokdo = ui.push_font(dokdo);
ui.text("Hello, I'm Dokdo Regular!");
_dokdo.pop();
ui.text("Hello, I'm Roboto Regular again!");
_roboto.pop();
ui.text("Hello, I'm the default font again!");
});
});
}