diff --git a/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_main_menu.cpp b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_main_menu.cpp index 6706e241c8..fc7f8457fd 100644 --- a/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_main_menu.cpp +++ b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_main_menu.cpp @@ -23,6 +23,8 @@ namespace rsx is_current_page = true; m_message_box = std::make_shared(x, y, width, height); + m_message_box->visible = false; + m_config_changed = std::make_shared(g_backup_cfg.to_string() != g_cfg.to_string()); std::unique_ptr resume = std::make_unique(get_localized_string(localized_string_id::HOME_MENU_RESUME)); diff --git a/rpcs3/Emu/RSX/Overlays/Trophies/overlay_trophy_list_dialog.cpp b/rpcs3/Emu/RSX/Overlays/Trophies/overlay_trophy_list_dialog.cpp index 5d66ae87d0..1291e7e216 100644 --- a/rpcs3/Emu/RSX/Overlays/Trophies/overlay_trophy_list_dialog.cpp +++ b/rpcs3/Emu/RSX/Overlays/Trophies/overlay_trophy_list_dialog.cpp @@ -9,7 +9,21 @@ namespace rsx { namespace overlays { - trophy_list_dialog::trophy_list_entry::trophy_list_entry(const std::string& name, const std::string& description, const std::string& trophy_type, const std::string& icon_path, bool hidden, bool locked, bool platinum_relevant) + static constexpr u16 trophy_list_y = 85; + static constexpr u16 trophy_list_h = 540; + + struct trophy_list_entry : horizontal_layout + { + private: + std::unique_ptr icon_data; + + public: + trophy_list_entry(const SceNpTrophyDetails& details, const std::string& icon_path, bool locked, bool platinum_relevant); + s32 trophy_id = 0; + }; + + trophy_list_entry::trophy_list_entry(const SceNpTrophyDetails& details, const std::string& icon_path, bool locked, bool platinum_relevant) + : trophy_id(details.trophyId) { std::unique_ptr image = std::make_unique(); image->set_size(160, 110); @@ -17,7 +31,7 @@ namespace rsx if (fs::exists(icon_path)) { - icon_data = std::make_unique(icon_path.c_str(), hidden || locked); + icon_data = std::make_unique(icon_path.c_str(), details.hidden || locked); static_cast(image.get())->set_raw_image(icon_data.get()); } else @@ -27,10 +41,20 @@ namespace rsx static_cast(image.get())->set_image_resource(resource_config::standard_image_resource::square); } + std::string trophy_type; + switch (details.trophyGrade) + { + case SCE_NP_TROPHY_GRADE_BRONZE: trophy_type = get_localized_string(localized_string_id::HOME_MENU_TROPHY_GRADE_BRONZE); break; + case SCE_NP_TROPHY_GRADE_SILVER: trophy_type = get_localized_string(localized_string_id::HOME_MENU_TROPHY_GRADE_SILVER); break; + case SCE_NP_TROPHY_GRADE_GOLD: trophy_type = get_localized_string(localized_string_id::HOME_MENU_TROPHY_GRADE_GOLD); break; + case SCE_NP_TROPHY_GRADE_PLATINUM: trophy_type = get_localized_string(localized_string_id::HOME_MENU_TROPHY_GRADE_PLATINUM); break; + default: trophy_type = "?"; break; + } + std::unique_ptr text_stack = std::make_unique(); std::unique_ptr padding = std::make_unique(); - std::unique_ptr header_text = std::make_unique