SaveTool: use the shorthand getters added in the previous commit.

This commit is contained in:
Guillaume Jacquemin 2022-03-09 13:27:21 +01:00
parent 8f4708f518
commit f1a4b64219
2 changed files with 6 additions and 6 deletions

View file

@ -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;

View file

@ -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)) {