add button to open save folder (#289)

This commit is contained in:
Logan McNaughton authored and GitHub committed 2025-02-27 11:29:30 +01:00
1 parent 37b902eb31
commit eb9f37f1f5
1 file changed
+13
+13
View File
@@ -493,6 +493,19 @@ impl eframe::App for GopherEguiApp {
self.netplay.create = true;
}
if ui.button("Open Saves Folder").clicked() {
let command = if cfg!(target_os = "windows") {
"explorer"
} else if cfg!(target_os = "linux") {
"xdg-open"
} else {
panic!("Unsupported platform");
};
let _ = std::process::Command::new(command)
.arg(self.dirs.data_dir.join("saves"))
.spawn();
}
ui.end_row();
if ui.button("Configure Input Profile").clicked()