diff --git a/source/ui/mainPage.cpp b/source/ui/mainPage.cpp index 084a8c8..c363a06 100755 --- a/source/ui/mainPage.cpp +++ b/source/ui/mainPage.cpp @@ -1,5 +1,5 @@ #include -#include "MainApplication.hpp" +#include "ui/MainApplication.hpp" #include "ui/mainPage.hpp" #include "curl.hpp" #include "util.hpp" @@ -18,16 +18,16 @@ namespace inst::ui { this->optionMenu = pu::ui::elm::Menu::New(0, 160, 1280, COLOR("#FFFFFF00"), 80, (560 / 80)); this->optionMenu->SetOnFocusColor(COLOR("#00000033")); this->installMenuItem = pu::ui::elm::MenuItem::New("Install NSP"); - this->installMenuItem->AddOnClick(std::bind(&MainPage::installMenuItem_Click, this)); + //this->installMenuItem->AddOnClick(std::bind(&MainPage::installMenuItem_Click, this)); this->installMenuItem->SetColor(COLOR("#FFFFFFFF")); this->netInstallMenuItem = pu::ui::elm::MenuItem::New("Install NSP Over LAN"); - this->netInstallMenuItem->AddOnClick(std::bind(&MainPage::netInstallMenuItem_Click, this)); + //this->netInstallMenuItem->AddOnClick(std::bind(&MainPage::netInstallMenuItem_Click, this)); this->netInstallMenuItem->SetColor(COLOR("#FFFFFFFF")); this->sigPatchesMenuItem = pu::ui::elm::MenuItem::New("Install Signature Patches"); - this->sigPatchesMenuItem->AddOnClick(std::bind(&MainPage::sigPatchesMenuItem_Click, this)); + //this->sigPatchesMenuItem->AddOnClick(std::bind(&MainPage::sigPatchesMenuItem_Click, this)); this->sigPatchesMenuItem->SetColor(COLOR("#FFFFFFFF")); this->exitMenuItem = pu::ui::elm::MenuItem::New("Exit"); - this->exitMenuItem->AddOnClick(std::bind(&MainPage::exitMenuItem_Click, this)); + //this->exitMenuItem->AddOnClick(std::bind(&MainPage::exitMenuItem_Click, this)); this->exitMenuItem->SetColor(COLOR("#FFFFFFFF")); this->Add(this->topText); this->optionMenu->AddItem(this->installMenuItem); @@ -75,5 +75,23 @@ namespace inst::ui { if ((Down & KEY_PLUS) || (Down & KEY_MINUS) || (Down & KEY_B)) { mainApp->Close(); } + if (Down & KEY_A) { + switch (this->optionMenu->GetSelectedIndex()) { + case 0: + MainPage::installMenuItem_Click(); + break; + case 1: + MainPage::netInstallMenuItem_Click(); + break; + case 2: + MainPage::sigPatchesMenuItem_Click(); + break; + case 3: + MainPage::exitMenuItem_Click(); + break; + default: + break; + } + } } }