prep icons in the settings page for theming

This commit is contained in:
mrdude2478 2023-09-22 05:01:17 +01:00
parent 5ddd80b53a
commit 0e8881bee6
7 changed files with 13 additions and 5 deletions

View File

@ -58,7 +58,7 @@ CFLAGS := -g -Wall -O2 -ffunction-sections \
CFLAGS += $(INCLUDE) -D__SWITCH__ -Wno-deprecated -Wall #-D__DEBUG__ -DNXLINK_DEBUG
CXXFLAGS := $(CFLAGS) -fno-rtti -std=gnu++17 -Wall
CXXFLAGS := $(CFLAGS) -fno-rtti -std=gnu++20 -Wall
ASFLAGS := -g $(ARCH)

Binary file not shown.

Binary file not shown.

View File

@ -23,7 +23,9 @@ SOFTWARE.
#include "install/install.hpp"
#include <switch.h>
#include <iostream>
#include <cstring>
#include <sstream>
#include <memory>
#include "util/error.hpp"

View File

@ -85,7 +85,7 @@ namespace tin::install::nsp
std::string name(this->GetFileEntryName(fileEntry));
auto foundExtension = name.substr(name.find(".") + 1);
// fix cert filname extension becoming corrupted when xcz/nsz is installing certs/ticks.
// fix cert filename extension becoming corrupted when xcz/nsz is installing certs.
std::string cert ("cert");
std::size_t found = name.find(cert);
if (found!=std::string::npos){

View File

@ -160,7 +160,7 @@ namespace tin::install::xci
std::string name(this->GetFileEntryName(fileEntry));
auto foundExtension = name.substr(name.find(".") + 1);
// fix cert filname extension becoming corrupted when xcz/nsz is installing certs/ticks.
// fix cert filename extension becoming corrupted when xcz/nsz is installing certs.
std::string cert ("cert");
std::size_t found = name.find(cert);
if (found!=std::string::npos){

View File

@ -86,8 +86,8 @@ namespace inst::ui {
}
std::string optionsPage::getMenuOptionIcon(bool ourBool) {
if (ourBool) return "romfs:/images/icons/check-box-outline.png";
else return "romfs:/images/icons/checkbox-blank-outline.png";
if (ourBool) return "romfs:/images/icons/checked.png";
else return "romfs:/images/icons/unchecked.png";
}
std::string optionsPage::getMenuLanguage(int ourLangCode) {
@ -186,26 +186,32 @@ namespace inst::ui {
auto SigPatch = pu::ui::elm::MenuItem::New("main.menu.sig"_lang);
SigPatch->SetColor(COLOR("#FFFFFFFF"));
SigPatch->SetIcon("romfs:/images/icons/plaster.png");
this->menu->AddItem(SigPatch);
auto sigPatchesUrlOption = pu::ui::elm::MenuItem::New("options.menu_items.sig_url"_lang + inst::util::shortenString(inst::config::sigPatchesUrl, 42, false));
sigPatchesUrlOption->SetColor(COLOR("#FFFFFFFF"));
sigPatchesUrlOption->SetIcon("romfs:/images/icons/keyboard.png");
this->menu->AddItem(sigPatchesUrlOption);
auto httpServerUrlOption = pu::ui::elm::MenuItem::New("options.menu_items.http_url"_lang + inst::util::shortenString(inst::config::httpIndexUrl, 42, false));
httpServerUrlOption->SetColor(COLOR("#FFFFFFFF"));
httpServerUrlOption->SetIcon("romfs:/images/icons/url.png");
this->menu->AddItem(httpServerUrlOption);
auto languageOption = pu::ui::elm::MenuItem::New("options.menu_items.language"_lang + this->getMenuLanguage(inst::config::languageSetting));
languageOption->SetColor(COLOR("#FFFFFFFF"));
languageOption->SetIcon("romfs:/images/icons/speak.png");
this->menu->AddItem(languageOption);
auto updateOption = pu::ui::elm::MenuItem::New("options.menu_items.check_update"_lang);
updateOption->SetColor(COLOR("#FFFFFFFF"));
updateOption->SetIcon("romfs:/images/icons/update2.png");
this->menu->AddItem(updateOption);
auto creditsOption = pu::ui::elm::MenuItem::New("options.menu_items.credits"_lang);
creditsOption->SetColor(COLOR("#FFFFFFFF"));
creditsOption->SetIcon("romfs:/images/icons/credits2.png");
this->menu->AddItem(creditsOption);
}