trophies/overlays: treat unlocked hidden trophies just like normal unlocked trophies
Some checks are pending
Generate Translation Template / Generate Translation Template (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run

This commit is contained in:
Megamouse 2025-05-08 14:54:54 +02:00
parent 12f4e4fd8c
commit 21cdbd90e9

View File

@ -31,7 +31,7 @@ namespace rsx
if (fs::exists(icon_path))
{
icon_data = std::make_unique<image_info>(icon_path, details.hidden || locked);
icon_data = std::make_unique<image_info>(icon_path, locked);
static_cast<image_view*>(image.get())->set_raw_image(icon_data.get());
}
else
@ -53,7 +53,7 @@ namespace rsx
std::unique_ptr<overlay_element> text_stack = std::make_unique<vertical_layout>();
std::unique_ptr<overlay_element> padding = std::make_unique<spacer>();
std::unique_ptr<overlay_element> header_text = std::make_unique<label>(fmt::format("%s (%s%s)", (locked && !details.hidden) ? get_localized_string(localized_string_id::HOME_MENU_TROPHY_LOCKED_TITLE, details.name) : details.name, trophy_type, platinum_relevant ? " - " + get_localized_string(localized_string_id::HOME_MENU_TROPHY_PLATINUM_RELEVANT) : ""));
std::unique_ptr<overlay_element> header_text = std::make_unique<label>(fmt::format("%s (%s%s)", locked ? get_localized_string(localized_string_id::HOME_MENU_TROPHY_LOCKED_TITLE, details.name) : details.name, trophy_type, platinum_relevant ? " - " + get_localized_string(localized_string_id::HOME_MENU_TROPHY_PLATINUM_RELEVANT) : ""));
std::unique_ptr<overlay_element> subtext = std::make_unique<label>(details.description);
padding->set_size(1, 1);
@ -344,7 +344,8 @@ namespace rsx
details.trophyId = atoi(n->GetAttribute("id").c_str());
details.hidden = n->GetAttribute("hidden")[0] == 'y';
const bool hide_trophy = details.hidden && !m_show_hidden_trophies;
const bool unlocked = m_trophy_data->trop_usr->GetTrophyUnlockState(details.trophyId);
const bool hide_trophy = details.hidden && !unlocked && !m_show_hidden_trophies;
if (details.trophyId == old_trophy_id)
{
@ -373,7 +374,7 @@ namespace rsx
}
// Get name and detail
if (details.hidden)
if (details.hidden && !unlocked)
{
strcpy_trunc(details.name, hidden_title);
strcpy_trunc(details.description, hidden_description);
@ -394,7 +395,6 @@ namespace rsx
}
}
const bool unlocked = m_trophy_data->trop_usr->GetTrophyUnlockState(details.trophyId);
const auto icon_path_it = m_trophy_data->trophy_image_paths.find(details.trophyId);
std::unique_ptr<overlay_element> entry = std::make_unique<trophy_list_entry>(details, icon_path_it != m_trophy_data->trophy_image_paths.cend() ? icon_path_it->second : "", !unlocked, platinum_relevant);