flow improvements

This commit is contained in:
2026-04-25 16:02:39 +03:00
parent 22b669fae0
commit 4ffa6ed970
21 changed files with 150 additions and 59 deletions
+23 -7
View File
@@ -11,15 +11,25 @@ static std::vector<uint64_t> accSids, devSids, bcatSids, cacheSids;
namespace ui {
extern MainApplication *mainApp;
void TitlesLayout::InitTitles() {
this->titlesMenu = pu::ui::elm::Menu::New(0, 0, 1280, COLOR("#67000000"), COLOR("#170909FF"), 94, 7);
for (size_t i = 0; i < getTitleCount(g_currentUId); i++) {
Title title;
getTitle(title, g_currentUId, i);
auto titleItem = pu::ui::elm::MenuItem::New(title.name().c_str());
titleItem->SetColor(COLOR("#FFFFFFFF"));
this->titlesMenu->AddItem(titleItem);
Logger::getInstance().log(Logger::INFO, "InitTitles");
auto it = this->menuCache.find(g_currentUId);
if (it != this->menuCache.end()) {
this->titlesMenu = it->second;
} else {
auto menu = pu::ui::elm::Menu::New(0, 0, 1280, COLOR("#67000000"), COLOR("#170909FF"), 94, 7);
for (size_t i = 0; i < getTitleCount(g_currentUId); i++) {
Title title;
getTitle(title, g_currentUId, i);
auto titleItem = pu::ui::elm::MenuItem::New(title.name().c_str());
titleItem->SetColor(COLOR("#FFFFFFFF"));
menu->AddItem(titleItem);
}
this->menuCache.emplace(g_currentUId, menu);
this->titlesMenu = menu;
}
this->Clear();
this->Add(this->titlesMenu);
this->SetBackgroundColor(BACKGROUND_COLOR);
@@ -28,6 +38,11 @@ namespace ui {
void TitlesLayout::onInput(u64 Down, u64 Up, u64 Held, pu::ui::TouchPoint Pos) {
if (m_inputLocked) return;
if (Down & HidNpadButton_B) {
mainApp->LoadLayout(mainApp->usersLayout);
return;
}
if (Down & HidNpadButton_Plus) {
cancelClientTransfer();
cancelServerTransfer();
@@ -60,6 +75,7 @@ namespace ui {
}
while (!isClientTransferDone()) {
ovl->SetStatus(getClientStatusText());
ovl->SetProgressVisible(isClientProgressKnown());
ovl->SetProgress(getClientProgress());
mainApp->CallForRender();
if (mainApp->GetButtonsDown() & HidNpadButton_B) {