1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-12-22 16:42:11 +00:00

Even (more) changes.

* TitlesTabItem: override playClickAnimation() to only play the animation when we really need it.

* Fix typos in the localization files.
This commit is contained in:
Pablo Curiel 2022-07-28 04:13:48 +02:00
parent eee1b2a771
commit 4d9cb8f19d
6 changed files with 25 additions and 16 deletions

View file

@ -50,9 +50,12 @@ namespace nxdt::views
private:
const TitleApplicationMetadata *app_metadata = nullptr;
bool is_system = false;
bool click_anim;
public:
TitlesTabItem(const TitleApplicationMetadata *app_metadata, bool is_system);
TitlesTabItem(const TitleApplicationMetadata *app_metadata, bool is_system, bool click_anim = true);
void playClickAnimation(void) override;
ALWAYS_INLINE const TitleApplicationMetadata *GetApplicationMetadata(void)
{

View file

@ -1,8 +1,8 @@
{
"description": "Nintendo Switch Dump Tool",
"copyright": "Licensed under GPLv3+\n\u00A9 2020 - 2021 {0}\n{1}",
"copyright": "Licensed under GPLv3+\n\u00A9 2020 - 2022 {0}\n{1}",
"dependencies": {
"header": "Dependencies",
"line_00": "\uE016 {0} is powered by Borealis, a hardware-accelerated UI library: {1}.",
@ -11,12 +11,12 @@
"line_03": "\uE016 LZ4 is used to decompress NSO binaries: {0}.",
"line_04": "\uE016 json-c is used to parse JSON-formatted data: {0}."
},
"acknowledgments": {
"header": "Acknowledgments",
"line_00": "\uE016 Switchbrew and libnx contributors.",
"line_01": "\uE016 SciresM, for hactool and Atmosphère-NX.",
"line_02": "\uE016 shchmue, for Lockpick and its runtime key-collection algorithm, as well as helping in reverse engineering tasks.",
"line_01": "\uE016 SciresM, for hactool, hac2l and Atmosphère-NX.",
"line_02": "\uE016 shchmue, for Lockpick and its runtime key-collection algorithm, as well as helping with reverse engineering tasks.",
"line_03": "\uE016 Adubbz, for Tinfoil and its ES service bindings.",
"line_04": "\uE016 RattletraPM, for the awesome icon.",
"line_05": "\uE016 Whovian9369, for being a key piece throughout the whole development by providing lots of testing and cool ideas.",
@ -26,7 +26,7 @@
"line_09": "\uE016 The Comfy Boyes, for always being awesome and supportive. You know who you are.",
"line_10": "\uE016 And, at last but not least, you! Thank you for using my work!"
},
"links": {
"header": "Additional links and resources",
"line_00": "\uE016 Discord server: {0}."

View file

@ -11,8 +11,8 @@
"launch_error_info": "Please take out the gamecard and reinsert it into the console after exiting nxdumptool to mitigate launch errors.",
"user_titles": {
"header": "Applications available on the inserted gamecard",
"info": "To perform operations on the user titles available on this gamecard, please go to the \"{0}\" menu."
"header": "Applications available in the inserted gamecard",
"info": "To perform operations on the user titles available in this gamecard, please go to the \"{0}\" menu."
},
"properties_table": {

View file

@ -61,8 +61,8 @@ namespace nxdt::views
/* Acknowledgments. */
this->addView(new brls::Header("about_tab/acknowledgments/header"_i18n));
for(int i = 0; i < 8; i++) this->addView(new AboutTabLabel(brls::LabelStyle::SMALL, i18n::getStr(fmt::format("about_tab/acknowledgments/line_{:02d}", i)), false));
for(int i = 8; i < 11; i++) this->addView(new brls::Label(brls::LabelStyle::SMALL, i18n::getStr(fmt::format("about_tab/acknowledgments/line_{:02d}", i)), true));
for(int i = 0; i < 7; i++) this->addView(new AboutTabLabel(brls::LabelStyle::SMALL, i18n::getStr(fmt::format("about_tab/acknowledgments/line_{:02d}", i))));
for(int i = 7; i < 11; i++) this->addView(new brls::Label(brls::LabelStyle::SMALL, i18n::getStr(fmt::format("about_tab/acknowledgments/line_{:02d}", i)), true));
/* Additional links and resources. */
this->addView(new brls::Header("about_tab/links/header"_i18n));

View file

@ -124,7 +124,7 @@ namespace nxdt::views
/* Populate list. */
for(u32 i = 0; i < app_metadata_count; i++)
{
TitlesTabItem *title = new TitlesTabItem(app_metadata[i], false);
TitlesTabItem *title = new TitlesTabItem(app_metadata[i], false, false);
title->unregisterAction(brls::Key::A);
this->list->addView(title);
}

View file

@ -61,9 +61,10 @@ namespace nxdt::views
}
}
TitlesTabItem::TitlesTabItem(const TitleApplicationMetadata *app_metadata, bool is_system) : brls::ListItem(std::string(app_metadata->lang_entry.name), "", ""), \
app_metadata(app_metadata),
is_system(is_system)
TitlesTabItem::TitlesTabItem(const TitleApplicationMetadata *app_metadata, bool is_system, bool click_anim) : brls::ListItem(std::string(app_metadata->lang_entry.name), "", ""), \
app_metadata(app_metadata), \
is_system(is_system), \
click_anim(click_anim)
{
/* Set sublabel. */
if (!this->is_system) this->setSubLabel(std::string(app_metadata->lang_entry.author));
@ -75,6 +76,11 @@ namespace nxdt::views
this->setValue(fmt::format("{:016X}", this->app_metadata->title_id), false, false);
}
void TitlesTabItem::playClickAnimation(void)
{
if (this->click_anim) brls::View::playClickAnimation();
}
TitlesTab::TitlesTab(RootView *root_view, bool is_system) : LayeredErrorFrame("titles_tab/no_titles_available"_i18n), root_view(root_view), is_system(is_system)
{
/* Populate list. */