Compare commits
4 commits
51602c713a
...
13d09e4aa0
Author | SHA1 | Date | |
---|---|---|---|
13d09e4aa0 | |||
ed0c4a73bb | |||
8102d1d83a | |||
9a9c08391a |
5 changed files with 29 additions and 5 deletions
|
@ -22,7 +22,7 @@ struct StoryProgressPoint {
|
|||
Int id;
|
||||
const char* chapter;
|
||||
const char* point;
|
||||
const char* after = "";
|
||||
const char* after = nullptr;
|
||||
};
|
||||
|
||||
static const Corrade::Containers::Array<StoryProgressPoint> story_progress
|
||||
|
|
|
@ -95,6 +95,10 @@ SaveTool::SaveTool(const Arguments& arguments):
|
|||
|
||||
_backupsDir = Utility::Directory::join(Utility::Directory::path(Utility::Directory::executableLocation()), "backups");
|
||||
_stagingDir = Utility::Directory::join(Utility::Directory::path(Utility::Directory::executableLocation()), "staging");
|
||||
_armouryDir = Utility::Directory::join(Utility::Directory::path(Utility::Directory::executableLocation()), "armoury");
|
||||
_armoursDir = Utility::Directory::join(_armouryDir, "armours");
|
||||
_weaponsDir = Utility::Directory::join(_armouryDir, "weapons");
|
||||
_stylesDir = Utility::Directory::join(_armouryDir, "styles");
|
||||
|
||||
if(!Utility::Directory::exists(_backupsDir)) {
|
||||
Utility::Directory::mkpath(_backupsDir);
|
||||
|
@ -104,6 +108,22 @@ SaveTool::SaveTool(const Arguments& arguments):
|
|||
Utility::Directory::mkpath(_stagingDir);
|
||||
}
|
||||
|
||||
if(!Utility::Directory::exists(_armouryDir)) {
|
||||
Utility::Directory::mkpath(_armouryDir);
|
||||
}
|
||||
|
||||
if(!Utility::Directory::exists(_armoursDir)) {
|
||||
Utility::Directory::mkpath(_armoursDir);
|
||||
}
|
||||
|
||||
if(!Utility::Directory::exists(_weaponsDir)) {
|
||||
Utility::Directory::mkpath(_weaponsDir);
|
||||
}
|
||||
|
||||
if(!Utility::Directory::exists(_stylesDir)) {
|
||||
Utility::Directory::mkpath(_stylesDir);
|
||||
}
|
||||
|
||||
if(!findGameDataDirectory()) {
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error initialising the app", _lastError.c_str(), window());
|
||||
exit(EXIT_FAILURE);
|
||||
|
@ -748,7 +768,7 @@ void SaveTool::drawTooltip(const char* text, Float wrap_pos) {
|
|||
}
|
||||
|
||||
void SaveTool::openUri(const std::string& uri) {
|
||||
ShellExecuteW(nullptr, nullptr, Utility::Unicode::widen(uri).c_str(), nullptr, nullptr, SW_SHOW);
|
||||
ShellExecuteW(nullptr, nullptr, Utility::Unicode::widen(uri).c_str(), nullptr, nullptr, SW_SHOWDEFAULT);
|
||||
}
|
||||
|
||||
void SaveTool::checkGameState() {
|
||||
|
|
|
@ -212,6 +212,10 @@ class SaveTool: public Platform::Sdl2Application, public efsw::FileWatchListener
|
|||
|
||||
std::string _backupsDir;
|
||||
std::string _stagingDir;
|
||||
std::string _armouryDir;
|
||||
std::string _armoursDir;
|
||||
std::string _weaponsDir;
|
||||
std::string _stylesDir;
|
||||
|
||||
enum class GameState : UnsignedByte {
|
||||
Unknown, NotRunning, Running
|
||||
|
|
|
@ -188,7 +188,7 @@ void SaveTool::drawGeneralInfo() {
|
|||
{
|
||||
ImGui::TextUnformatted("Story progress:");
|
||||
ImGui::SameLine(0.0f, ImGui::GetStyle().ItemSpacing.x / 4.0f);
|
||||
if(std::strcmp(it->after, "") == 0) {
|
||||
if(!it->after) {
|
||||
ImGui::TextWrapped("%s - %s", it->chapter, it->point);
|
||||
}
|
||||
else {
|
||||
|
@ -261,7 +261,7 @@ void SaveTool::drawGeneralInfo() {
|
|||
}
|
||||
for(const auto& sp : story_progress) {
|
||||
if(ImGui::BeginMenu(sp.chapter)) {
|
||||
if(std::strcmp(sp.after, "") == 0) {
|
||||
if(!sp.after) {
|
||||
if(ImGui::MenuItem(sp.point)) {
|
||||
if(!_currentProfile->setStoryProgress(sp.id)) {
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error",
|
||||
|
|
|
@ -90,7 +90,7 @@ void SaveTool::drawProfileManager() {
|
|||
}
|
||||
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::TextUnformatted(_profileManager->profiles()[i].type() == ProfileType::Demo ? "Demo" : "Full");
|
||||
ImGui::TextUnformatted(_profileManager->profiles()[i].type() == ProfileType::Demo ? "Demo (legacy)" : "Full (legacy)");
|
||||
|
||||
ImGui::TableSetColumnIndex(2);
|
||||
if(ImGui::SmallButton(ICON_FA_FILE_ARCHIVE)) {
|
||||
|
|
Loading…
Reference in a new issue