Icons in options screen, more string updates

This commit is contained in:
Huntereb 2019-10-27 20:05:51 -04:00
parent e6ced2d66a
commit 9a42a05a3f
6 changed files with 11 additions and 9 deletions

View file

@ -18,6 +18,6 @@ namespace inst::ui {
TextBlock::Ref pageInfoText;
pu::ui::elm::Menu::Ref menu;
void setMenuText();
std::string getMenuOptionText(bool ourBool);
std::string getMenuOptionIcon(bool ourBool);
};
}

BIN
romfs/check-box-outline.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
romfs/checkbox-blank-outline.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -116,7 +116,7 @@ namespace netInstStuff{
printf("\n");
printf("%s\n", "NSP_INSTALL_NETWORK_SENDING_ACK");
inst::ui::setInstInfoText("Sending acknowledgment of install to server...");
inst::ui::setInstInfoText("Telling the server we're done installing...");
// Send 1 byte ack to close the server
u8 ack = 0;
tin::network::WaitSendNetworkData(m_clientSocket, &ack, sizeof(u8));

View file

@ -55,7 +55,7 @@ namespace inst::ui {
if (inst::util::getDirectoryFiles("sdmc:/", {".nsp"}).size()) {
mainApp->LoadLayout(mainApp->nspinstPage);
} else {
mainApp->CreateShowDialog("No NSP files found!", "NSPs can be placed on the root of your SD card!", {"OK"}, true);
mainApp->CreateShowDialog("No NSP files found!", "Copy your NSP files to the root of your SD card!", {"OK"}, true);
}
}

View file

@ -11,7 +11,7 @@
namespace inst::ui {
extern MainApplication *mainApp;
std::vector<std::string> ourMenuEntries = {"Ignore Required Firmware Version: ", "Remove Anime: ", "Signature Patches Source URL: "};
std::vector<std::string> ourMenuEntries = {"Ignore Required Firmware Version", "Remove Anime", "Signature Patches Source URL: "};
optionsPage::optionsPage() : Layout::Layout() {
this->SetBackgroundColor(COLOR("#670000FF"));
@ -37,18 +37,20 @@ namespace inst::ui {
this->Add(this->menu);
}
std::string optionsPage::getMenuOptionText(bool ourBool) {
if(ourBool) return "Enabled";
else return "Disabled";
std::string optionsPage::getMenuOptionIcon(bool ourBool) {
if(ourBool) return "romfs:/check-box-outline.png";
else return "romfs:/checkbox-blank-outline.png";
}
void optionsPage::setMenuText() {
this->menu->ClearItems();
auto ignoreFirmOption = pu::ui::elm::MenuItem::New(ourMenuEntries[0] + getMenuOptionText(inst::config::ignoreReqVers));
auto ignoreFirmOption = pu::ui::elm::MenuItem::New(ourMenuEntries[0]);
ignoreFirmOption->SetColor(COLOR("#FFFFFFFF"));
ignoreFirmOption->SetIcon(optionsPage::getMenuOptionIcon(inst::config::ignoreReqVers));
this->menu->AddItem(ignoreFirmOption);
auto gayModeOption = pu::ui::elm::MenuItem::New(ourMenuEntries[1] + getMenuOptionText(inst::config::gayMode));
auto gayModeOption = pu::ui::elm::MenuItem::New(ourMenuEntries[1]);
gayModeOption->SetColor(COLOR("#FFFFFFFF"));
gayModeOption->SetIcon(optionsPage::getMenuOptionIcon(inst::config::gayMode));
this->menu->AddItem(gayModeOption);
auto sigPatchesUrlOption = pu::ui::elm::MenuItem::New(ourMenuEntries[2] + inst::config::sigPatchesUrl);
sigPatchesUrlOption->SetColor(COLOR("#FFFFFFFF"));