fixed font size

This commit is contained in:
mrdude2478 2022-04-26 12:42:06 +01:00
parent c3c3c92f47
commit 08ea2f94ef
10 changed files with 28 additions and 27 deletions

View File

@ -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 # list of directories containing libraries, this must be the top level containing
# include and lib # 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 # 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 @rm -fr $(BUILD) $(TARGET).nsp $(TARGET).nso $(TARGET).npdm $(TARGET).elf
endif 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 else

View File

@ -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 # list of directories containing libraries, this must be the top level containing
# include and lib # 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 # no real need to edit anything past this point unless you need to add additional

View File

@ -13,6 +13,7 @@ namespace inst::ui {
void usbInstallMenuItem_Click(); void usbInstallMenuItem_Click();
void HdInstallMenuItem_Click(); void HdInstallMenuItem_Click();
void settingsMenuItem_Click(); void settingsMenuItem_Click();
void mainMenuThread();
void exitMenuItem_Click(); void exitMenuItem_Click();
void onInput(u64 Down, u64 Up, u64 Held, pu::ui::TouchPoint touch_pos); void onInput(u64 Down, u64 Up, u64 Held, pu::ui::TouchPoint touch_pos);
Image::Ref awooImage; Image::Ref awooImage;

View File

@ -37,10 +37,9 @@ namespace inst::ui {
this->SetBackgroundImage("romfs:/images/Background.png"); this->SetBackgroundImage("romfs:/images/Background.png");
this->titleImage = Image::New(0, 0, "romfs:/images/Hd.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 = TextBlock::New(10, 109, "inst.hd.top_info"_lang);
this->pageInfoText->SetFont(pu::ui::MakeDefaultFontName(30));
this->pageInfoText->SetColor(COLOR("#FFFFFFFF")); 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 = TextBlock::New(10, 678, "inst.hd.buttons"_lang);
this->butText->SetColor(COLOR("#FFFFFFFF")); this->butText->SetColor(COLOR("#FFFFFFFF"));
this->menu = pu::ui::elm::Menu::New(0, 156, 1280, COLOR("#FFFFFF00"), COLOR("#4f4f4d33"), 84, 6); this->menu = pu::ui::elm::Menu::New(0, 156, 1280, COLOR("#FFFFFF00"), COLOR("#4f4f4d33"), 84, 6);

View File

@ -18,23 +18,20 @@ namespace inst::ui {
else this->titleImage = Image::New(0, 0, "romfs:/images/Install.png"); 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"); 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"); else this->SetBackgroundImage("romfs:/images/Background.png");
//this->appVersionText = TextBlock::New(0, 0, "", 0);
this->appVersionText = TextBlock::New(0, 0, ""); this->appVersionText = TextBlock::New(0, 0, "");
} }
else { else {
this->SetBackgroundImage("romfs:/images/Background.png"); this->SetBackgroundImage("romfs:/images/Background.png");
this->titleImage = Image::New(0, 0, "romfs:/images/Install.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 = TextBlock::New(0, 0, "");
} }
this->appVersionText->SetColor(COLOR("#FFFFFFFF")); this->appVersionText->SetColor(COLOR("#FFFFFFFF"));
//this->pageInfoText = TextBlock::New(10, 109, "", 30);
this->pageInfoText = TextBlock::New(10, 109, ""); this->pageInfoText = TextBlock::New(10, 109, "");
this->pageInfoText->SetFont(pu::ui::MakeDefaultFontName(30));
this->pageInfoText->SetColor(COLOR("#FFFFFFFF")); this->pageInfoText->SetColor(COLOR("#FFFFFFFF"));
//this->installInfoText = TextBlock::New(15, 648, "", 22);
this->installInfoText = TextBlock::New(15, 648, ""); this->installInfoText = TextBlock::New(15, 648, "");
this->installInfoText->SetFont(pu::ui::MakeDefaultFontName(22));
this->installInfoText->SetColor(COLOR("#FFFFFFFF")); 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 = pu::ui::elm::ProgressBar::New(10, 680, 1260, 30, 100.0f);
this->installBar->SetBackgroundColor(COLOR("#000000FF")); this->installBar->SetBackgroundColor(COLOR("#000000FF"));
this->installBar->SetProgressColor(COLOR("#565759FF")); this->installBar->SetProgressColor(COLOR("#565759FF"));

View File

@ -129,7 +129,7 @@ namespace inst::ui {
inst::ui::mainApp->CreateShowDialog("Space Usage Information", Info, {"common.ok"_lang}, true); inst::ui::mainApp->CreateShowDialog("Space Usage Information", Info, {"common.ok"_lang}, true);
} }
void mainMenuThread() { void MainPage::mainMenuThread() {
bool menuLoaded = mainApp->IsShown(); bool menuLoaded = mainApp->IsShown();
if (!appletFinished && appletGetAppletType() == AppletType_LibraryApplet) { if (!appletFinished && appletGetAppletType() == AppletType_LibraryApplet) {
tin::data::NUM_BUFFER_SEGMENTS = 2; tin::data::NUM_BUFFER_SEGMENTS = 2;
@ -166,11 +166,9 @@ namespace inst::ui {
this->SetBackgroundImage("romfs:/images/Background.png"); this->SetBackgroundImage("romfs:/images/Background.png");
this->titleImage = Image::New(0, 0, "romfs:/images/Main.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 = TextBlock::New(10, 678, "main.buttons"_lang);
this->butText->SetColor(COLOR("#FFFFFFFF")); this->butText->SetColor(COLOR("#FFFFFFFF"));
this->optionMenu = pu::ui::elm::Menu::New(0, 95, 1280, COLOR("#343E8700"), COLOR("#4f4f4d33"), 94, 6); 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->optionMenu->SetScrollbarColor(COLOR("#1A1919FF"));
this->installMenuItem = pu::ui::elm::MenuItem::New("main.menu.sd"_lang); this->installMenuItem = pu::ui::elm::MenuItem::New("main.menu.sd"_lang);
this->installMenuItem->SetColor(COLOR("#FFFFFFFF")); this->installMenuItem->SetColor(COLOR("#FFFFFFFF"));
@ -212,7 +210,7 @@ namespace inst::ui {
this->Add(this->eggImage); this->Add(this->eggImage);
this->awooImage->SetVisible(!inst::config::gayMode); this->awooImage->SetVisible(!inst::config::gayMode);
this->Add(this->optionMenu); 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() { 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) { 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()) { if (((Down & HidNpadButton_Plus) || (Down & HidNpadButton_Minus) || (Down & HidNpadButton_B)) && mainApp->IsShown()) {
mainApp->FadeOut(); mainApp->FadeOut();
mainApp->Close(); mainApp->Close();
} }
if ((Down & HidNpadButton_A) /*|| (Up & HidGestureType_Touch)*/) {
if (Down & HidNpadButton_A) {
switch (this->optionMenu->GetSelectedIndex()) { switch (this->optionMenu->GetSelectedIndex()) {
case 0: case 0:
this->installMenuItem_Click(); this->installMenuItem_Click();

View File

@ -41,6 +41,7 @@ namespace inst::ui {
this->appVersionText->SetColor(COLOR("#FFFFFFFF")); this->appVersionText->SetColor(COLOR("#FFFFFFFF"));
//this->pageInfoText = TextBlock::New(10, 109, "", 30); //this->pageInfoText = TextBlock::New(10, 109, "", 30);
this->pageInfoText = TextBlock::New(10, 109, ""); this->pageInfoText = TextBlock::New(10, 109, "");
this->pageInfoText->SetFont(pu::ui::MakeDefaultFontName(30));
this->pageInfoText->SetColor(COLOR("#FFFFFFFF")); this->pageInfoText->SetColor(COLOR("#FFFFFFFF"));
//this->butText = TextBlock::New(10, 678, "", 24); //this->butText = TextBlock::New(10, 678, "", 24);
this->butText = TextBlock::New(10, 678, ""); this->butText = TextBlock::New(10, 678, "");

View File

@ -31,20 +31,18 @@ namespace inst::ui {
else this->titleImage = Image::New(0, 0, "romfs:/images/Settings.png"); 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"); 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"); 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); this->appVersionText = TextBlock::New(1210, 680, "v" + inst::config::appVersion);
} }
else { else {
this->SetBackgroundImage("romfs:/images/Background.png"); this->SetBackgroundImage("romfs:/images/Background.png");
this->titleImage = Image::New(0, 0, "romfs:/images/Settings.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 = TextBlock::New(1210, 680, "v" + inst::config::appVersion);
} }
this->appVersionText->SetColor(COLOR("#FFFFFFFF")); 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 = TextBlock::New(10, 109, "options.title"_lang);
this->pageInfoText->SetFont(pu::ui::MakeDefaultFontName(30));
this->pageInfoText->SetColor(COLOR("#FFFFFFFF")); 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 = TextBlock::New(10, 678, "options.buttons"_lang);
this->butText->SetColor(COLOR("#FFFFFFFF")); this->butText->SetColor(COLOR("#FFFFFFFF"));
this->menu = pu::ui::elm::Menu::New(0, 156, 1280, COLOR("#FFFFFF00"), COLOR("#4f4f4d33"), 84, (506 / 84)); 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) { void optionsPage::onInput(u64 Down, u64 Up, u64 Held, pu::ui::TouchPoint touch_pos) {
if (Down & HidNpadButton_B) { if (Down & HidNpadButton_B) {
mainApp->LoadLayout(mainApp->mainPage); mainApp->LoadLayout(mainApp->mainPage);
} }
if ((Down & HidNpadButton_A)) { if (Down & HidNpadButton_A) {
std::string keyboardResult; std::string keyboardResult;
int rc; int rc;
std::vector<std::string> downloadUrl; std::vector<std::string> downloadUrl;

View File

@ -23,20 +23,17 @@ namespace inst::ui {
else this->titleImage = Image::New(0, 0, "romfs:/images/Sd.png"); 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"); 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"); else this->SetBackgroundImage("romfs:/images/Background.png");
//this->appVersionText = TextBlock::New(0, 0, "", 0);
this->appVersionText = TextBlock::New(0, 0, ""); this->appVersionText = TextBlock::New(0, 0, "");
} }
else { else {
this->SetBackgroundImage("romfs:/images/Background.png"); this->SetBackgroundImage("romfs:/images/Background.png");
this->titleImage = Image::New(0, 0, "romfs:/images/Sd.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 = TextBlock::New(0, 0, "");
} }
this->appVersionText->SetColor(COLOR("#FFFFFFFF")); 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 = TextBlock::New(10, 109, "inst.sd.top_info"_lang);
this->pageInfoText->SetFont(pu::ui::MakeDefaultFontName(30));
this->pageInfoText->SetColor(COLOR("#FFFFFFFF")); 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 = TextBlock::New(10, 678, "inst.sd.buttons"_lang);
this->butText->SetColor(COLOR("#FFFFFFFF")); this->butText->SetColor(COLOR("#FFFFFFFF"));
this->menu = pu::ui::elm::Menu::New(0, 156, 1280, COLOR("#FFFFFF00"), COLOR("#4f4f4d33"), 84, (506 / 84)); this->menu = pu::ui::elm::Menu::New(0, 156, 1280, COLOR("#FFFFFF00"), COLOR("#4f4f4d33"), 84, (506 / 84));

View File

@ -22,20 +22,17 @@ namespace inst::ui {
else this->titleImage = Image::New(0, 0, "romfs:/images/Usb.png"); 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"); 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"); else this->SetBackgroundImage("romfs:/images/Background.png");
//this->appVersionText = TextBlock::New(0, 0, "", 0);
this->appVersionText = TextBlock::New(0, 0, ""); this->appVersionText = TextBlock::New(0, 0, "");
} }
else { else {
this->SetBackgroundImage("romfs:/images/Background.png"); this->SetBackgroundImage("romfs:/images/Background.png");
this->titleImage = Image::New(0, 0, "romfs:/images/Usb.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 = TextBlock::New(0, 0, "");
} }
this->appVersionText->SetColor(COLOR("#FFFFFFFF")); this->appVersionText->SetColor(COLOR("#FFFFFFFF"));
//this->pageInfoText = TextBlock::New(10, 109, "", 30);
this->pageInfoText = TextBlock::New(10, 109, ""); this->pageInfoText = TextBlock::New(10, 109, "");
this->pageInfoText->SetColor(COLOR("#FFFFFFFF")); 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 = TextBlock::New(10, 678, "");
this->butText->SetColor(COLOR("#FFFFFFFF")); this->butText->SetColor(COLOR("#FFFFFFFF"));
this->menu = pu::ui::elm::Menu::New(0, 156, 1280, COLOR("#FFFFFF00"), COLOR("#4f4f4d33"), 84, (506 / 84)); this->menu = pu::ui::elm::Menu::New(0, 156, 1280, COLOR("#FFFFFF00"), COLOR("#4f4f4d33"), 84, (506 / 84));