mirror of
https://github.com/HamletDuFromage/aio-switch-updater.git
synced 2024-12-27 10:06:01 +00:00
Added disclaimer when cheats matching a different BID are found
This commit is contained in:
parent
2b87d60e34
commit
e30f59b4b2
3 changed files with 10 additions and 5 deletions
|
@ -35,7 +35,7 @@ protected:
|
|||
void WriteCheats(const std::string& cheatContent);
|
||||
void AddCheatsfileListItem();
|
||||
void ShowBidNotFound();
|
||||
void ShowCheatsNotFound();
|
||||
void ShowCheatsNotFound(const std::string& versionsWithCheats = "");
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -47,7 +47,8 @@
|
|||
"delete_cheats": "Delete cheats for this game",
|
||||
"deletion_error": "Couldn't delete the cheat files for game with ID:\n{}",
|
||||
"show_cheat_files": "Show all cheat files",
|
||||
"cheats_not_found": "Couldn't find cheat codes matching this build ID."
|
||||
"cheats_not_found": "Couldn't find cheat codes matching this build ID.",
|
||||
"old_cheats_found": "Cheat codes matching BID(s) [ {}] exist."
|
||||
},
|
||||
"common": {
|
||||
"downloading": "Downloading…",
|
||||
|
|
|
@ -194,11 +194,11 @@ void DownloadCheatsPage::ShowBidNotFound()
|
|||
this->list->addView(label);
|
||||
}
|
||||
|
||||
void DownloadCheatsPage::ShowCheatsNotFound()
|
||||
void DownloadCheatsPage::ShowCheatsNotFound(const std::string& versionsWithCheats)
|
||||
{
|
||||
brls::Label* label = new brls::Label(
|
||||
brls::LabelStyle::REGULAR,
|
||||
"menus/cheats/cheats_not_found"_i18n,
|
||||
"menus/cheats/cheats_not_found"_i18n + (!versionsWithCheats.empty() ? "\n" + fmt::format("menus/cheats/old_cheats_found"_i18n, versionsWithCheats) : ""),
|
||||
true);
|
||||
this->list->addView(label);
|
||||
}
|
||||
|
@ -375,7 +375,11 @@ DownloadCheatsPage_GbaTemp::DownloadCheatsPage_GbaTemp(uint64_t tid, const std::
|
|||
this->list->addView(new brls::ListItemGroupSpacing(true));
|
||||
}
|
||||
else {
|
||||
ShowCheatsNotFound();
|
||||
std::string versionsWithCheats;
|
||||
for (auto& [key, val] : cheatsJson.items()) {
|
||||
versionsWithCheats += key + " ";
|
||||
}
|
||||
ShowCheatsNotFound(versionsWithCheats);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue