diff --git a/include/JC_page.hpp b/include/JC_page.hpp index 00dee94..679732c 100644 --- a/include/JC_page.hpp +++ b/include/JC_page.hpp @@ -7,7 +7,7 @@ class JCPage : public brls::AppletFrame private: brls::List* list; brls::Label* label; - std::vector items; + brls::ListItem* listItem; brls::ListItem* restore; brls::ListItem* backup; diff --git a/include/PC_page.hpp b/include/PC_page.hpp index dabb5a6..75f9039 100644 --- a/include/PC_page.hpp +++ b/include/PC_page.hpp @@ -7,7 +7,7 @@ class PCPage : public brls::AppletFrame private: brls::List* list; brls::Label* label; - std::vector items; + brls::ListItem* listItem; brls::ListItem* restore; brls::ListItem* backup; diff --git a/resources/i18n/de/menus.json b/resources/i18n/de/menus.json index 46cdacf..5bcbc82 100644 --- a/resources/i18n/de/menus.json +++ b/resources/i18n/de/menus.json @@ -146,7 +146,7 @@ "ams_update": { "reboot_rcm": "Die switch wird nun zu einem Speziellem Payload rebooten um den Installationsprozess ab zu schließen.", "install_hekate": "Möchtest du auch Hekate herunterladen?\nFalls nein, wird die Switch nun zu einem Speziellem Payload rebooten um den Installationsprozess ab zu schließen.", - "delete_contents": "möchtest du den existierenden '/atmosphere/contents/' Ordner löschen? Dies wird Crashes vorbeugen, falls ein Sysmodul die neueste Atmosph\u00e8re version nicht unterstützt. Bedenke dass dies all deine Sysmodule, Mods und Cheats löscht!", + "delete_contents": "Möchtest du den existierenden '/atmosphere/contents/' Ordner löschen? Dies wird Crashes vorbeugen, falls ein Sysmodul die neueste Atmosph\u00e8re version nicht unterstützt. Bedenke dass dies all deine Sysmodule, Mods und Cheats löscht!", "delete_sysmodules_flags": "Möchtest du den Autostart von allen Sysmodules verhindern? Dies wird Crashes vorbeugen, falls ein Sysmodul die neueste Atmosph\u00e8re version nicht unterstützt.", "current_ams": "\ue016 Momentane Atmosphère version: " }, diff --git a/resources/i18n/en-US/menus.json b/resources/i18n/en-US/menus.json index 6820d92..92dc84c 100644 --- a/resources/i18n/en-US/menus.json +++ b/resources/i18n/en-US/menus.json @@ -86,7 +86,8 @@ "desc": "You can change the internal color of your Pro Controller. Make sure it's set to Player 1.", "label": "Pro Controller color swapper", "backing_up": "Backing up the color profile", - "all_done": "All done! You may need to turn your controller on and off for the change to take effect" + "all_done": "All done! You may need to turn your controller on and off for the change to take effect.", + "changing": "Changing color. Make sure the Pro-Con is set to player 1." }, "main": { "getting": "Getting ", diff --git a/source/JC_page.cpp b/source/JC_page.cpp index 6481d55..560d8f4 100644 --- a/source/JC_page.cpp +++ b/source/JC_page.cpp @@ -35,16 +35,15 @@ JCPage::JCPage() : AppletFrame(true, true) auto profiles = getProfiles(COLOR_PROFILES_PATH); std::vector names = std::get<0>(profiles); int nbProfiles = names.size(); - items.reserve(nbProfiles); for (int i = nbProfiles - 1; i >= 0; i--){ std::string name = std::get<0>(profiles)[i]; std::vector value = std::get<1>(profiles)[i]; - items[i] = new brls::ListItem(names[i]); - items[i]->getClickEvent()->subscribe([&, value](brls::View* view) { + listItem = new brls::ListItem(names[i]); + listItem->getClickEvent()->subscribe([&, value](brls::View* view) { brls::StagedAppletFrame* stagedFrame = new brls::StagedAppletFrame(); - stagedFrame->setTitle("joy_con/title"_i18n); + stagedFrame->setTitle("menus/joy_con/label"_i18n); stagedFrame->addStage( - new WorkerPage(stagedFrame, "menus/jc_changing"_i18n, + new WorkerPage(stagedFrame, "menus/joy_con/changing"_i18n, [value](){changeJCColor(value);}) ); stagedFrame->addStage( @@ -52,7 +51,7 @@ JCPage::JCPage() : AppletFrame(true, true) ); brls::Application::pushView(stagedFrame); }); - list->addView(items[i]); + list->addView(listItem); } this->setContentView(list); } \ No newline at end of file diff --git a/source/PC_page.cpp b/source/PC_page.cpp index 5a1de7c..e1f2098 100644 --- a/source/PC_page.cpp +++ b/source/PC_page.cpp @@ -34,16 +34,15 @@ PCPage::PCPage() : AppletFrame(true, true) auto profiles = pc::getProfiles(PC_COLOR_PATH); std::vector names = std::get<0>(profiles); int nbProfiles = names.size(); - items.reserve(nbProfiles); for (int i = nbProfiles - 1; i >= 0; i--){ std::string name = std::get<0>(profiles)[i]; std::vector value = std::get<1>(profiles)[i]; - items[i] = new brls::ListItem(names[i]); - items[i]->getClickEvent()->subscribe([&, value](brls::View* view) { + listItem = new brls::ListItem(names[i]); + listItem->getClickEvent()->subscribe([&, value](brls::View* view) { brls::StagedAppletFrame* stagedFrame = new brls::StagedAppletFrame(); stagedFrame->setTitle("menus/pro_con/label"_i18n); stagedFrame->addStage( - new WorkerPage(stagedFrame, "menus/jc_changing"_i18n, + new WorkerPage(stagedFrame, "menus/pro_con/changing"_i18n, [value](){pc::changePCColor(value);}) ); stagedFrame->addStage( @@ -51,7 +50,7 @@ PCPage::PCPage() : AppletFrame(true, true) ); brls::Application::pushView(stagedFrame); }); - list->addView(items[i]); + list->addView(listItem); } this->setContentView(list); } \ No newline at end of file