save dialog, n=tabs y=spaces
This commit is contained in:
parent
738ccb53cf
commit
0291a6e941
@ -5,7 +5,7 @@ use image::DynamicImage;
|
|||||||
|
|
||||||
use rfd::FileDialog;
|
use rfd::FileDialog;
|
||||||
|
|
||||||
use board_builder::{ Board, CoordTransformer, read_board_from_file };
|
use board_builder::{ Board, CoordTransformer, read_board_from_file, write_board_to_file };
|
||||||
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
@ -45,7 +45,9 @@ impl eframe::App for BoardBuilderApp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ui.button("Save As...").clicked() {
|
if ui.button("Save As...").clicked() {
|
||||||
choose_file();
|
if let Some(board_file) = FileDialog::new().save_file() {
|
||||||
|
write_board_to_file(&self.board, self.image.as_ref(), &board_file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ui.button("Open Image...").clicked() {
|
if ui.button("Open Image...").clicked() {
|
||||||
let image_file = FileDialog::new()
|
let image_file = FileDialog::new()
|
||||||
|
Loading…
Reference in New Issue
Block a user