1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

use env_logger in all examples (#2934)

This commit is contained in:
Emil Ernerfeldt
2023-04-19 16:35:38 +02:00
committed by GitHub
parent e3a021eea6
commit ce761e548f
33 changed files with 76 additions and 37 deletions

View File

@@ -12,3 +12,4 @@ publish = false
eframe = { path = "../../crates/eframe", features = [
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] }
env_logger = "0.10"

View File

@@ -3,6 +3,17 @@
use eframe::egui;
use egui::{FontFamily, FontId, RichText, TextStyle};
fn main() -> Result<(), eframe::Error> {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions::default();
eframe::run_native(
"egui example: global font style",
options,
Box::new(|cc| Box::new(MyApp::new(cc))),
)
}
#[inline]
fn heading2() -> TextStyle {
TextStyle::Name("Heading2".into())
@@ -58,14 +69,4 @@ impl eframe::App for MyApp {
}
}
fn main() -> Result<(), eframe::Error> {
let options = eframe::NativeOptions::default();
eframe::run_native(
"egui example: global font style",
options,
Box::new(|cc| Box::new(MyApp::new(cc))),
)
}
pub const LOREM_IPSUM: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";