draft transfer implementation

This commit is contained in:
2024-08-25 00:02:59 +03:00
parent 31953464e7
commit d2f369af9a
109 changed files with 2314 additions and 4165 deletions

View File

@@ -1,17 +1,16 @@
#include <cstdio>
#include <data.h>
#include <MainApplication.hpp>
#include "main.hpp"
namespace ui {
extern MainApplication *mainApp;
UsersLayout::UsersLayout() : Layout::Layout() {
this->usersMenu = pu::ui::elm::Menu::New(0, 0, 1280, COLOR("#67000000"), COLOR("#170909FF"), 94,
7);
this->usersMenu = pu::ui::elm::Menu::New(0, 0, 1280, COLOR("#67000000"), COLOR("#170909FF"), 94, 7);
this->usersMenu->SetScrollbarColor(COLOR("#170909FF"));
for (data::user &u: data::users) {
auto username = pu::ui::elm::MenuItem::New(u.getUsername() + ": " + std::to_string(u.titleInfo.size()));
for (AccountUid const& uid : Account::ids()) {
auto username = pu::ui::elm::MenuItem::New(Account::username(uid) + ": " + std::to_string(getTitleCount(uid)));
username->SetColor(COLOR("#FFFFFFFF"));
this->usersMenu->AddItem(username);
}
@@ -31,7 +30,7 @@ namespace ui {
if (Down & HidNpadButton_A) {
printf("current index is %i\n", this->usersMenu->GetSelectedIndex());
data::setUserIndex(this->usersMenu->GetSelectedIndex());
g_currentUId = Account::ids().at(this->usersMenu->GetSelectedIndex());
mainApp->titlesLayout->InitTitles();
mainApp->LoadLayout(mainApp->titlesLayout);
}