redesign, broadcast server crash fix
This commit is contained in:
+24
-9
@@ -6,26 +6,42 @@ 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->SetScrollbarColor(COLOR("#170909FF"));
|
||||
using namespace theme;
|
||||
|
||||
this->usersMenu = pu::ui::elm::Menu::New(
|
||||
0, layout::ContentTop + space::md,
|
||||
layout::ScreenW,
|
||||
color::BgBase, color::BgSurface2,
|
||||
88, 6);
|
||||
this->usersMenu->SetScrollbarColor(color::Primary);
|
||||
this->usersMenu->SetItemsFocusColor(color::BgSurface2);
|
||||
|
||||
for (AccountUid const& uid : Account::ids()) {
|
||||
auto item = pu::ui::elm::MenuItem::New(Account::username(uid));
|
||||
item->SetColor(COLOR("#FFFFFFFF"));
|
||||
item->SetColor(color::TextPrimary);
|
||||
this->usersMenu->AddItem(item);
|
||||
}
|
||||
|
||||
this->loadingBg = pu::ui::elm::Rectangle::New(0, 0, 1280, 720, pu::ui::Color(30, 30, 30, 220));
|
||||
this->loadingBg = pu::ui::elm::Rectangle::New(
|
||||
0, 0, layout::ScreenW, layout::ScreenH, color::Scrim);
|
||||
this->loadingBg->SetVisible(false);
|
||||
|
||||
this->loadingText = pu::ui::elm::TextBlock::New(480, 340, "Reading game list...");
|
||||
this->loadingText->SetColor(pu::ui::Color(255, 255, 255, 255));
|
||||
this->loadingText = pu::ui::elm::TextBlock::New(
|
||||
layout::ScreenW / 2 - 120,
|
||||
layout::ScreenH / 2 - 12,
|
||||
"Loading saves...");
|
||||
this->loadingText->SetFont(type::font(type::Body));
|
||||
this->loadingText->SetColor(color::TextSecondary);
|
||||
this->loadingText->SetVisible(false);
|
||||
|
||||
this->SetBackgroundColor(BACKGROUND_COLOR);
|
||||
this->SetBackgroundColor(color::BgBase);
|
||||
this->Add(this->usersMenu);
|
||||
this->Add(this->loadingBg);
|
||||
this->Add(this->loadingText);
|
||||
|
||||
this->header = std::make_unique<HeaderBar>(this, "Select a user");
|
||||
this->hints = std::make_unique<HintBar>(this);
|
||||
this->hints->SetHints({{"A", "Select"}, {"+", "Quit"}});
|
||||
}
|
||||
|
||||
int32_t UsersLayout::GetCurrentIndex() {
|
||||
@@ -34,8 +50,7 @@ namespace ui {
|
||||
|
||||
void UsersLayout::onInput(u64 Down, u64 Up, u64 Held, pu::ui::TouchPoint Pos) {
|
||||
if (Down & HidNpadButton_Plus) {
|
||||
mainApp->Close();
|
||||
return;
|
||||
svcExitProcess();
|
||||
}
|
||||
|
||||
if (Down & HidNpadButton_A) {
|
||||
|
||||
Reference in New Issue
Block a user