From eb9f37f1f50256c5f5dad7073f4c2d0378a2dee2 Mon Sep 17 00:00:00 2001 From: Logan McNaughton <848146+loganmc10@users.noreply.github.com> Date: Thu, 27 Feb 2025 11:29:30 +0100 Subject: [PATCH] add button to open save folder (#289) --- src/ui/gui.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/ui/gui.rs b/src/ui/gui.rs index 3665f4a..69989a4 100644 --- a/src/ui/gui.rs +++ b/src/ui/gui.rs @@ -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()