upgrade gui
This commit is contained in:
19
src/main.rs
19
src/main.rs
@@ -51,7 +51,6 @@ fn main() -> std::io::Result<()> {
|
||||
after_compression.write_all(string.as_bytes())?;
|
||||
to_compress.seek(SeekFrom::Start(0))?;
|
||||
let map = tree_to_map(&mut tree, true);
|
||||
eprintln!("map = {:?}", map);
|
||||
let trad = body_to_bin(&mut to_compress, map);
|
||||
let trad_bin = string_to_binary(&trad);
|
||||
let len_body = trad.len() as u32;
|
||||
@@ -105,8 +104,15 @@ fn main() -> std::io::Result<()> {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
println!("Illegal arguments !");
|
||||
display_options();
|
||||
let options = eframe::NativeOptions {
|
||||
viewport: egui::ViewportBuilder::default().with_inner_size([640.0, 480.0]),
|
||||
..Default::default()
|
||||
};
|
||||
let _ = eframe::run_native(
|
||||
"Omelt",
|
||||
options,
|
||||
Box::new(|_| Ok(Box::new(Omelt::new(&r, File::open(&r)?)))),
|
||||
);
|
||||
}
|
||||
}
|
||||
None => {
|
||||
@@ -114,12 +120,15 @@ fn main() -> std::io::Result<()> {
|
||||
viewport: egui::ViewportBuilder::default().with_inner_size([640.0, 480.0]),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let _ = eframe::run_native(
|
||||
"Omelt",
|
||||
options,
|
||||
Box::new(|_| {
|
||||
// This gives us image support:
|
||||
Ok(Box::<Omelt>::default())
|
||||
Ok(Box::new(Omelt::new(
|
||||
"new_file.oeuf",
|
||||
File::create("new_file.oeuf")?,
|
||||
)))
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user