diff --git a/UI/FirmwareScreen.cpp b/UI/FirmwareScreen.cpp index 4ea87f0d99..6de432b85d 100644 --- a/UI/FirmwareScreen.cpp +++ b/UI/FirmwareScreen.cpp @@ -53,18 +53,18 @@ void FirmwareScreen::CreateContentViews(UI::ViewGroup *parent) { auto di = GetI18NCategory(I18NCat::DIALOG); auto st = GetI18NCategory(I18NCat::STORE); // Borrow "Size" from here, like GameScreen does. - LinearLayout *content = parent->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT))); + ChoiceGroupList *list = parent->Add(new ChoiceGroupList()); if (!info_.anythingInstalled) { - content->Add(new NoticeView(NoticeLevel::INFO, sy->T("No firmware installed"), + list->Add(new NoticeView(NoticeLevel::INFO, sy->T("No firmware installed"), sy->T("FirmwareSources", "PPSSPP has its own replacements for the PSP's system files, so a firmware is optional. Installing one gets you the real fonts, and lets you launch the XMB. Most game discs carry a firmware updater - open a game's info screen to install from it."))); - content->Add(new TextWithImage(ImageID("I_FOLDER"), GetFriendlyPath(nandRoot_))); + list->Add(new TextWithImage(ImageID("I_FOLDER"), GetFriendlyPath(nandRoot_))); return; } if (!info_.version.empty()) { std::string versionLine = std::string(sy->T("Firmware version")) + ": " + info_.version; - content->Add(new TextView(versionLine, ALIGN_LEFT, false))->SetBig(true); + list->Add(new TextView(versionLine, ALIGN_LEFT, false))->SetBig(true); if (!info_.buildDate.empty() || !info_.target.empty()) { std::string details = info_.buildDate; if (!info_.target.empty()) { @@ -73,12 +73,12 @@ void FirmwareScreen::CreateContentViews(UI::ViewGroup *parent) { } details += info_.target; } - content->Add(new TextView(details, ALIGN_LEFT, false)); + list->Add(new TextView(details, ALIGN_LEFT, false)); } } else { // No flash0:/vsh/etc/version.txt, so this isn't a full firmware - most likely just the // fonts, which is what installing from a running game's disc leaves behind. - content->Add(new NoticeView(NoticeLevel::INFO, sy->T("Partial firmware installed"), + list->Add(new NoticeView(NoticeLevel::INFO, sy->T("Partial firmware installed"), sy->T("Some system files are present, but not a complete firmware"))); } @@ -86,7 +86,7 @@ void FirmwareScreen::CreateContentViews(UI::ViewGroup *parent) { // off a game's disc, and rows reading "Kernel modules: 0 / XMB: No" say nothing useful. const bool fullFirmware = info_.kernelModuleCount > 0; - content->Add(new ItemHeader(sy->T("Contents"))); + ChoiceGroup *content = list->Add(new ChoiceGroup(sy->T("Contents"))); content->Add(new InfoItem(sy->T("Fonts"), info_.fontCount)); if (fullFirmware) { content->Add(new InfoItem(sy->T("Kernel modules"), info_.kernelModuleCount)); @@ -98,9 +98,6 @@ void FirmwareScreen::CreateContentViews(UI::ViewGroup *parent) { content->Add(new InfoItem(sy->T("Files"), info_.fileCount)); } content->Add(new InfoItem(st->T("Size"), NiceSizeFormat(info_.totalSize))); - - content->Add(new ItemHeader(iz->T("Install into folder"))); - content->Add(new TextView(GetFriendlyPath(nandRoot_), ALIGN_LEFT | FLAG_WRAP_TEXT, false)); } void FirmwareScreen::CreateSettingsViews(UI::ViewGroup *parent) { diff --git a/UI/RemoteISOScreen.cpp b/UI/RemoteISOScreen.cpp index f63d1ea349..1ea3b269a3 100644 --- a/UI/RemoteISOScreen.cpp +++ b/UI/RemoteISOScreen.cpp @@ -336,32 +336,34 @@ void RemoteISOScreen::CreateConnectTab(UI::ViewGroup *tab) { using namespace UI; + ChoiceGroupList *list = tab->Add(new ChoiceGroupList()); + PermissionStatus status = System_GetPermissionStatus(SYSTEM_PERMISSION_LOCAL_NETWORK); if (status != PERMISSION_STATUS_GRANTED) { // Proceed with local network functionality - tab->Add(new Choice(T(I18NCat::NETWORKING, "Ask for network permission")))->OnClick.Add([](UI::EventParams &e) { + list->Add(new Choice(T(I18NCat::NETWORKING, "Ask for network permission")))->OnClick.Add([](UI::EventParams &e) { System_AskForPermission(SYSTEM_PERMISSION_LOCAL_NETWORK); }); return; } if (serverRunning_) { - tab->Add(new NoticeView(NoticeLevel::SUCCESS, ri->T("Currently sharing"), "", new LinearLayoutParams(Margins(12, 5, 0, 5)))); + list->Add(new NoticeView(NoticeLevel::SUCCESS, ri->T("Currently sharing"), "", new LinearLayoutParams(Margins(12, 5, 0, 5)))); } else { - tab->Add(new NoticeView(NoticeLevel::INFO, ri->T("Not currently sharing"), "", new LinearLayoutParams(Margins(12, 5, 0, 5)))); + list->Add(new NoticeView(NoticeLevel::INFO, ri->T("Not currently sharing"), "", new LinearLayoutParams(Margins(12, 5, 0, 5)))); } if ((RemoteISOShareType)g_Config.iRemoteISOShareType == RemoteISOShareType::RECENT) { - tab->Add(new TextView(ri->T("RemoteISODesc", "Games in your recent list will be shared"), new LinearLayoutParams(Margins(12, 5, 0, 5)))); + list->Add(new TextView(ri->T("RemoteISODesc", "Games in your recent list will be shared"), new LinearLayoutParams(Margins(12, 5, 0, 5)))); } else { - tab->Add(new TextView(std::string(ri->T("Share Games (Server)")) + ": " + GetFriendlyPath(Path(g_Config.sRemoteISOSharedDir)), new LinearLayoutParams(Margins(12, 5, 0, 5)))); + list->Add(new TextView(std::string(ri->T("Share Games (Server)")) + ": " + GetFriendlyPath(Path(g_Config.sRemoteISOSharedDir)), new LinearLayoutParams(Margins(12, 5, 0, 5)))); } - tab->Add(new TextView(ri->T("RemoteISOWifi", "Note: Connect both devices to the same wifi"), new LinearLayoutParams(Margins(12, 5, 0, 5)))); - firewallWarning_ = tab->Add(new TextView(ri->T("RemoteISOWinFirewall", "WARNING: Windows Firewall is blocking sharing"), new LinearLayoutParams(Margins(12, 5, 0, 5)))); + list->Add(new TextView(ri->T("RemoteISOWifi", "Note: Connect both devices to the same wifi"), new LinearLayoutParams(Margins(12, 5, 0, 5)))); + firewallWarning_ = list->Add(new TextView(ri->T("RemoteISOWinFirewall", "WARNING: Windows Firewall is blocking sharing"), new LinearLayoutParams(Margins(12, 5, 0, 5)))); firewallWarning_->SetTextColor(0xFF0000FF); firewallWarning_->SetVisibility(V_GONE); - ChoiceGroup *group = tab->Add(new ChoiceGroup()); + ChoiceGroup *group = list->Add(new ChoiceGroup()); Choice *browseChoice = new Choice(ri->T("Browse Games")); group->Add(browseChoice)->OnClick.Handle(this, &RemoteISOScreen::HandleBrowse); diff --git a/UI/SystemInfoScreen.cpp b/UI/SystemInfoScreen.cpp index c76900fa0f..1359183af2 100644 --- a/UI/SystemInfoScreen.cpp +++ b/UI/SystemInfoScreen.cpp @@ -126,11 +126,14 @@ void SystemInfoScreen::CreateDeviceInfoTab(UI::LinearLayout *deviceSpecs) { // deviceSpecs->Add(new TopBar(*screenManager()->getUIContext(), portrait ? TopBarFlags::Portrait : TopBarFlags::Default, si->T("Device Info"))); ChoiceGroupList *groups = deviceSpecs->Add(new ChoiceGroupList()); + + Choice *copy = groups->Add(new ChoiceGroup())->Add(new Choice(si->T("Copy summary to clipboard"), ImageID("I_FILE_COPY"))); + copy->OnClick.Add([this](UI::EventParams &e) { CopySummaryToClipboard(screenManager()->getDrawContext()); }); + ChoiceGroup *systemInfo = groups->Add(new ChoiceGroup(si->T("System Information"))); Draw::DrawContext *draw = screenManager()->getDrawContext(); - systemInfo->Add(new Choice(si->T("Copy summary to clipboard"), ImageID("I_FILE_COPY")))->OnClick.Add([this](UI::EventParams &e) { CopySummaryToClipboard(screenManager()->getDrawContext()); }); systemInfo->Add(new InfoItem(si->T("System Name"), System_GetProperty(SYSPROP_NAME))); #if PPSSPP_PLATFORM(ANDROID) systemInfo->Add(new InfoItem(si->T("System Version"), StringFromInt(System_GetPropertyInt(SYSPROP_SYSTEMVERSION))));