mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 23:13:13 -04:00
README.md: new images, better text (#3392)
* Update images in README.md * Add ferris image to hello_world example * Clean up and improve README.md, with top-level link to Rerun * Move sections around
This commit is contained in:
@@ -11,7 +11,12 @@ fn main() -> Result<(), eframe::Error> {
|
||||
eframe::run_native(
|
||||
"My egui App",
|
||||
options,
|
||||
Box::new(|_cc| Box::<MyApp>::default()),
|
||||
Box::new(|cc| {
|
||||
// This gives us image support:
|
||||
egui_extras::install_image_loaders(&cc.egui_ctx);
|
||||
|
||||
Box::<MyApp>::default()
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -43,6 +48,10 @@ impl eframe::App for MyApp {
|
||||
self.age += 1;
|
||||
}
|
||||
ui.label(format!("Hello '{}', age {}", self.name, self.age));
|
||||
|
||||
ui.image(egui::include_image!(
|
||||
"../../../crates/egui/assets/ferris.png"
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user