mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 12:52:18 -05:00
Open App Files Folder (#3221)
* Add "Open App Files Folder" menu item to Ship menu on desktop platforms to open the folder where mods, logs, etc, are found. * Change to `GetAppDirectoryPath` to get config location instead of executable/bundle path. Also unified the absolute path creation across all platforms by using `std::filesystem::absolute`. It manages to even expand the "." returned for portable Windows mode. * Removed unnecessary platform define check.
This commit is contained in:
parent
56deb1cf64
commit
6e50d7110a
@ -156,6 +156,12 @@ void DrawShipMenu() {
|
|||||||
}
|
}
|
||||||
#if !defined(__SWITCH__) && !defined(__WIIU__)
|
#if !defined(__SWITCH__) && !defined(__WIIU__)
|
||||||
UIWidgets::Spacer(0);
|
UIWidgets::Spacer(0);
|
||||||
|
if (ImGui::MenuItem("Open App Files Folder")) {
|
||||||
|
std::string filesPath = LUS::Context::GetInstance()->GetAppDirectoryPath();
|
||||||
|
SDL_OpenURL(std::string("file:///" + std::filesystem::absolute(filesPath).string()).c_str());
|
||||||
|
}
|
||||||
|
UIWidgets::Spacer(0);
|
||||||
|
|
||||||
if (ImGui::MenuItem("Quit")) {
|
if (ImGui::MenuItem("Quit")) {
|
||||||
LUS::Context::GetInstance()->GetWindow()->Close();
|
LUS::Context::GetInstance()->GetWindow()->Close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user