diff --git a/Makefile b/Makefile index 23c86f5..e0a7599 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ LIBS := -lpu -lcurl -lz -lssh2 -lusbhsfs -lntfs-3g -llwext4 -lmbedtls -lmbedcry # list of directories containing libraries, this must be the top level containing # include and lib #--------------------------------------------------------------------------------- -LIBDIRS := $(PORTLIBS) $(LIBNX) $(CURDIR)/include/Plutonium/Plutonium +LIBDIRS := $(PORTLIBS) $(CURDIR)/include/Plutonium/Plutonium $(DEVKITPRO)/libnx #--------------------------------------------------------------------------------- # no real need to edit anything past this point unless you need to add additional @@ -205,6 +205,16 @@ else @rm -fr $(BUILD) $(TARGET).nsp $(TARGET).nso $(TARGET).npdm $(TARGET).elf endif +#--------------------------------------------------------------------------------- +cleanall: + + @echo making everything + @$(MAKE) --no-print-directory -C $(CURDIR) -f Makefile clean + @$(MAKE) --no-print-directory -C $(CURDIR) -f Makefile libusbclean + @$(MAKE) --no-print-directory -C $(CURDIR) -f Makefile cleanplutonium + @rm -f $(CURDIR)/*.elf + @rm -f $(CURDIR)/*.nacp + @rm -f $(CURDIR)/*.nro #--------------------------------------------------------------------------------- else diff --git a/include/Plutonium/Plutonium/Makefile b/include/Plutonium/Plutonium/Makefile index e1151a4..ffdd64e 100644 --- a/include/Plutonium/Plutonium/Makefile +++ b/include/Plutonium/Plutonium/Makefile @@ -45,7 +45,7 @@ LIBS := $(SDL_IMAGE_LIBS) $(SDL_GFX_LIBS) $(SDL_MIXER_LIBS) -lEGL -lGLESv2 -lgl # list of directories containing libraries, this must be the top level containing # include and lib #--------------------------------------------------------------------------------- -LIBDIRS := $(PORTLIBS) $(LIBNX) +LIBDIRS := $(PORTLIBS) $(DEVKITPRO)/libnx #--------------------------------------------------------------------------------- # no real need to edit anything past this point unless you need to add additional diff --git a/include/ui/mainPage.hpp b/include/ui/mainPage.hpp index 809f372..12172d0 100644 --- a/include/ui/mainPage.hpp +++ b/include/ui/mainPage.hpp @@ -13,6 +13,7 @@ namespace inst::ui { void usbInstallMenuItem_Click(); void HdInstallMenuItem_Click(); void settingsMenuItem_Click(); + void mainMenuThread(); void exitMenuItem_Click(); void onInput(u64 Down, u64 Up, u64 Held, pu::ui::TouchPoint touch_pos); Image::Ref awooImage; diff --git a/source/ui/HDInstPage.cpp b/source/ui/HDInstPage.cpp index 326a8de..fea7957 100644 --- a/source/ui/HDInstPage.cpp +++ b/source/ui/HDInstPage.cpp @@ -37,10 +37,9 @@ namespace inst::ui { this->SetBackgroundImage("romfs:/images/Background.png"); this->titleImage = Image::New(0, 0, "romfs:/images/Hd.png"); } - //this->pageInfoText = TextBlock::New(10, 109, "inst.hd.top_info"_lang, 30); this->pageInfoText = TextBlock::New(10, 109, "inst.hd.top_info"_lang); + this->pageInfoText->SetFont(pu::ui::MakeDefaultFontName(30)); this->pageInfoText->SetColor(COLOR("#FFFFFFFF")); - //this->butText = TextBlock::New(10, 678, "inst.hd.buttons"_lang, 24); this->butText = TextBlock::New(10, 678, "inst.hd.buttons"_lang); this->butText->SetColor(COLOR("#FFFFFFFF")); this->menu = pu::ui::elm::Menu::New(0, 156, 1280, COLOR("#FFFFFF00"), COLOR("#4f4f4d33"), 84, 6); diff --git a/source/ui/instPage.cpp b/source/ui/instPage.cpp index 3ce3d95..734ce55 100644 --- a/source/ui/instPage.cpp +++ b/source/ui/instPage.cpp @@ -18,23 +18,20 @@ namespace inst::ui { else this->titleImage = Image::New(0, 0, "romfs:/images/Install.png"); if (std::filesystem::exists(inst::config::appDir + "/images/Background.png")) this->SetBackgroundImage(inst::config::appDir + "/images/Background.png"); else this->SetBackgroundImage("romfs:/images/Background.png"); - //this->appVersionText = TextBlock::New(0, 0, "", 0); this->appVersionText = TextBlock::New(0, 0, ""); } else { this->SetBackgroundImage("romfs:/images/Background.png"); this->titleImage = Image::New(0, 0, "romfs:/images/Install.png"); - //this->appVersionText = TextBlock::New(0, 0, "", 0); this->appVersionText = TextBlock::New(0, 0, ""); } this->appVersionText->SetColor(COLOR("#FFFFFFFF")); - //this->pageInfoText = TextBlock::New(10, 109, "", 30); this->pageInfoText = TextBlock::New(10, 109, ""); + this->pageInfoText->SetFont(pu::ui::MakeDefaultFontName(30)); this->pageInfoText->SetColor(COLOR("#FFFFFFFF")); - //this->installInfoText = TextBlock::New(15, 648, "", 22); this->installInfoText = TextBlock::New(15, 648, ""); + this->installInfoText->SetFont(pu::ui::MakeDefaultFontName(22)); this->installInfoText->SetColor(COLOR("#FFFFFFFF")); - //this->installBar = pu::ui::elm::ProgressBar::New(10, 600, 850, 40, 100.0f); this->installBar = pu::ui::elm::ProgressBar::New(10, 680, 1260, 30, 100.0f); this->installBar->SetBackgroundColor(COLOR("#000000FF")); this->installBar->SetProgressColor(COLOR("#565759FF")); diff --git a/source/ui/mainPage.cpp b/source/ui/mainPage.cpp index f2ef522..f02b79e 100644 --- a/source/ui/mainPage.cpp +++ b/source/ui/mainPage.cpp @@ -129,7 +129,7 @@ namespace inst::ui { inst::ui::mainApp->CreateShowDialog("Space Usage Information", Info, {"common.ok"_lang}, true); } - void mainMenuThread() { + void MainPage::mainMenuThread() { bool menuLoaded = mainApp->IsShown(); if (!appletFinished && appletGetAppletType() == AppletType_LibraryApplet) { tin::data::NUM_BUFFER_SEGMENTS = 2; @@ -166,11 +166,9 @@ namespace inst::ui { this->SetBackgroundImage("romfs:/images/Background.png"); this->titleImage = Image::New(0, 0, "romfs:/images/Main.png"); } - //this->butText = TextBlock::New(10, 678, "main.buttons"_lang, 24); this->butText = TextBlock::New(10, 678, "main.buttons"_lang); this->butText->SetColor(COLOR("#FFFFFFFF")); this->optionMenu = pu::ui::elm::Menu::New(0, 95, 1280, COLOR("#343E8700"), COLOR("#4f4f4d33"), 94, 6); - //this->optionMenu->SetItemsFocusColor(COLOR("#4f4f4d33")); this->optionMenu->SetScrollbarColor(COLOR("#1A1919FF")); this->installMenuItem = pu::ui::elm::MenuItem::New("main.menu.sd"_lang); this->installMenuItem->SetColor(COLOR("#FFFFFFFF")); @@ -212,7 +210,7 @@ namespace inst::ui { this->Add(this->eggImage); this->awooImage->SetVisible(!inst::config::gayMode); this->Add(this->optionMenu); - //this->AddThread(mainMenuThread); //fix later to prevent UI from freezing.... + //this->AddThread(this->mainMenuThread); //fix later to prevent UI from freezing.... } void MainPage::installMenuItem_Click() { @@ -260,11 +258,13 @@ namespace inst::ui { } void MainPage::onInput(u64 Down, u64 Up, u64 Held, pu::ui::TouchPoint touch_pos) { + if (((Down & HidNpadButton_Plus) || (Down & HidNpadButton_Minus) || (Down & HidNpadButton_B)) && mainApp->IsShown()) { mainApp->FadeOut(); mainApp->Close(); } - if ((Down & HidNpadButton_A) /*|| (Up & HidGestureType_Touch)*/) { + + if (Down & HidNpadButton_A) { switch (this->optionMenu->GetSelectedIndex()) { case 0: this->installMenuItem_Click(); diff --git a/source/ui/netInstPage.cpp b/source/ui/netInstPage.cpp index a42ba85..a1b4618 100644 --- a/source/ui/netInstPage.cpp +++ b/source/ui/netInstPage.cpp @@ -41,6 +41,7 @@ namespace inst::ui { this->appVersionText->SetColor(COLOR("#FFFFFFFF")); //this->pageInfoText = TextBlock::New(10, 109, "", 30); this->pageInfoText = TextBlock::New(10, 109, ""); + this->pageInfoText->SetFont(pu::ui::MakeDefaultFontName(30)); this->pageInfoText->SetColor(COLOR("#FFFFFFFF")); //this->butText = TextBlock::New(10, 678, "", 24); this->butText = TextBlock::New(10, 678, ""); diff --git a/source/ui/optionsPage.cpp b/source/ui/optionsPage.cpp index b0751b7..4064fbf 100644 --- a/source/ui/optionsPage.cpp +++ b/source/ui/optionsPage.cpp @@ -31,20 +31,18 @@ namespace inst::ui { else this->titleImage = Image::New(0, 0, "romfs:/images/Settings.png"); if (std::filesystem::exists(inst::config::appDir + "/images/Background.png")) this->SetBackgroundImage(inst::config::appDir + "/images/Background.png"); else this->SetBackgroundImage("romfs:/images/Background.png"); - //this->appVersionText = TextBlock::New(1210, 680, "v" + inst::config::appVersion, 20); this->appVersionText = TextBlock::New(1210, 680, "v" + inst::config::appVersion); } else { this->SetBackgroundImage("romfs:/images/Background.png"); this->titleImage = Image::New(0, 0, "romfs:/images/Settings.png"); - //this->appVersionText = TextBlock::New(1210, 680, "v" + inst::config::appVersion, 20); this->appVersionText = TextBlock::New(1210, 680, "v" + inst::config::appVersion); } this->appVersionText->SetColor(COLOR("#FFFFFFFF")); - //this->pageInfoText = TextBlock::New(10, 109, "options.title"_lang, 30); + this->appVersionText->SetFont(pu::ui::MakeDefaultFontName(20)); this->pageInfoText = TextBlock::New(10, 109, "options.title"_lang); + this->pageInfoText->SetFont(pu::ui::MakeDefaultFontName(30)); this->pageInfoText->SetColor(COLOR("#FFFFFFFF")); - //this->butText = TextBlock::New(10, 678, "options.buttons"_lang, 24); this->butText = TextBlock::New(10, 678, "options.buttons"_lang); this->butText->SetColor(COLOR("#FFFFFFFF")); this->menu = pu::ui::elm::Menu::New(0, 156, 1280, COLOR("#FFFFFF00"), COLOR("#4f4f4d33"), 84, (506 / 84)); @@ -178,10 +176,11 @@ namespace inst::ui { } void optionsPage::onInput(u64 Down, u64 Up, u64 Held, pu::ui::TouchPoint touch_pos) { + if (Down & HidNpadButton_B) { mainApp->LoadLayout(mainApp->mainPage); } - if ((Down & HidNpadButton_A)) { + if (Down & HidNpadButton_A) { std::string keyboardResult; int rc; std::vector downloadUrl; diff --git a/source/ui/sdInstPage.cpp b/source/ui/sdInstPage.cpp index 15c105b..14681e1 100644 --- a/source/ui/sdInstPage.cpp +++ b/source/ui/sdInstPage.cpp @@ -23,20 +23,17 @@ namespace inst::ui { else this->titleImage = Image::New(0, 0, "romfs:/images/Sd.png"); if (std::filesystem::exists(inst::config::appDir + "/images/Background.png")) this->SetBackgroundImage(inst::config::appDir + "/images/Background.png"); else this->SetBackgroundImage("romfs:/images/Background.png"); - //this->appVersionText = TextBlock::New(0, 0, "", 0); this->appVersionText = TextBlock::New(0, 0, ""); } else { this->SetBackgroundImage("romfs:/images/Background.png"); this->titleImage = Image::New(0, 0, "romfs:/images/Sd.png"); - //this->appVersionText = TextBlock::New(0, 0, "", 0); this->appVersionText = TextBlock::New(0, 0, ""); } this->appVersionText->SetColor(COLOR("#FFFFFFFF")); - //this->pageInfoText = TextBlock::New(10, 109, "inst.sd.top_info"_lang, 30); this->pageInfoText = TextBlock::New(10, 109, "inst.sd.top_info"_lang); + this->pageInfoText->SetFont(pu::ui::MakeDefaultFontName(30)); this->pageInfoText->SetColor(COLOR("#FFFFFFFF")); - //this->butText = TextBlock::New(10, 678, "inst.sd.buttons"_lang, 24); this->butText = TextBlock::New(10, 678, "inst.sd.buttons"_lang); this->butText->SetColor(COLOR("#FFFFFFFF")); this->menu = pu::ui::elm::Menu::New(0, 156, 1280, COLOR("#FFFFFF00"), COLOR("#4f4f4d33"), 84, (506 / 84)); diff --git a/source/ui/usbInstPage.cpp b/source/ui/usbInstPage.cpp index 6497e49..24a21bc 100644 --- a/source/ui/usbInstPage.cpp +++ b/source/ui/usbInstPage.cpp @@ -22,20 +22,17 @@ namespace inst::ui { else this->titleImage = Image::New(0, 0, "romfs:/images/Usb.png"); if (std::filesystem::exists(inst::config::appDir + "/images/Background.png")) this->SetBackgroundImage(inst::config::appDir + "/images/Background.png"); else this->SetBackgroundImage("romfs:/images/Background.png"); - //this->appVersionText = TextBlock::New(0, 0, "", 0); this->appVersionText = TextBlock::New(0, 0, ""); } else { this->SetBackgroundImage("romfs:/images/Background.png"); this->titleImage = Image::New(0, 0, "romfs:/images/Usb.png"); - //this->appVersionText = TextBlock::New(0, 0, "", 0); this->appVersionText = TextBlock::New(0, 0, ""); } this->appVersionText->SetColor(COLOR("#FFFFFFFF")); - //this->pageInfoText = TextBlock::New(10, 109, "", 30); this->pageInfoText = TextBlock::New(10, 109, ""); this->pageInfoText->SetColor(COLOR("#FFFFFFFF")); - //this->butText = TextBlock::New(10, 678, "", 24); + this->pageInfoText->SetFont(pu::ui::MakeDefaultFontName(30)); this->butText = TextBlock::New(10, 678, ""); this->butText->SetColor(COLOR("#FFFFFFFF")); this->menu = pu::ui::elm::Menu::New(0, 156, 1280, COLOR("#FFFFFF00"), COLOR("#4f4f4d33"), 84, (506 / 84));