From f1a4b6421973bf75631efd5e55b36ec47e614d90 Mon Sep 17 00:00:00 2001 From: William JCM Date: Wed, 9 Mar 2022 13:27:21 +0100 Subject: [PATCH] SaveTool: use the shorthand getters added in the previous commit. --- src/SaveTool/SaveTool_MainManager.cpp | 2 +- src/SaveTool/SaveTool_ProfileManager.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/SaveTool/SaveTool_MainManager.cpp b/src/SaveTool/SaveTool_MainManager.cpp index 98a65f6..8545e9e 100644 --- a/src/SaveTool/SaveTool_MainManager.cpp +++ b/src/SaveTool/SaveTool_MainManager.cpp @@ -42,7 +42,7 @@ void SaveTool::drawManager() { drawAlignedText("Current profile: %s (%s)", _currentProfile->companyName().data(), - _currentProfile->type() == ProfileType::Demo ? "demo" : "full game"); + _currentProfile->isDemo() ? "demo" : "full game"); ImGui::SameLine(); if(ImGui::Button(ICON_FA_ARROW_LEFT " Back to profile manager")) { _currentProfile = nullptr; diff --git a/src/SaveTool/SaveTool_ProfileManager.cpp b/src/SaveTool/SaveTool_ProfileManager.cpp index 5840a06..c87eaca 100644 --- a/src/SaveTool/SaveTool_ProfileManager.cpp +++ b/src/SaveTool/SaveTool_ProfileManager.cpp @@ -93,8 +93,8 @@ void SaveTool::drawProfileManager() { ImGui::TableSetColumnIndex(1); ImGui::Text("%s%s", - profile.type() == ProfileType::Demo ? "Demo" : "Full", - profile.version() == ProfileVersion::Legacy ? " (legacy)" : ""); + profile.isDemo() ? "Demo" : "Full", + profile.isLegacy() ? " (legacy)" : ""); ImGui::TableSetColumnIndex(2); if(ImGui::SmallButton(ICON_FA_FILE_ARCHIVE)) { @@ -364,9 +364,9 @@ auto SaveTool::drawDeleteProfilePopup(std::size_t profile_index) -> ImGuiID { } ImGui::PushTextWrapPos(windowSize().x() * 0.40f); - ImGui::Text("Are you sure you want to delete the %s %s profile ? This operation is irreversible.", - _profileManager->profiles()[profile_index].companyName().data(), - _profileManager->profiles()[profile_index].type() == ProfileType::Demo ? "demo" : "full game"); + ImGui::Text("Are you sure you want to delete the %s profile named %s ? This operation is irreversible.", + _profileManager->profiles()[profile_index].isDemo() ? "demo" : "full game", + _profileManager->profiles()[profile_index].companyName().data()); ImGui::PopTextWrapPos(); if(ImGui::BeginTable("##DeleteProfileLayout", 2)) {