diff --git a/romfs/lang/en/app.json b/romfs/lang/en/app.json index aa2a584..e7f9d20 100644 --- a/romfs/lang/en/app.json +++ b/romfs/lang/en/app.json @@ -116,5 +116,8 @@ "DELETE_TITLE": "Would you like to delete this title?", "MEDIATYPE_SD": "MediaType SD", "MEDIATYPE_NAND": "MediaType NAND", - "BOOT_TITLE": "Would you like to boot this title?" + "BOOT_TITLE": "Would you like to boot this title?", + + "GODMODE": "GodMode: ", + "FUNCTION_NOT_ALLOWED": "This function is not allowed without GodMode!" } diff --git a/source/screens/mainMenu.cpp b/source/screens/mainMenu.cpp index 04b1241..3186649 100644 --- a/source/screens/mainMenu.cpp +++ b/source/screens/mainMenu.cpp @@ -47,6 +47,20 @@ void MainMenu::Draw(void) const { Gui::DrawString(397-Gui::GetStringWidth(0.5f, V_STRING), 237-Gui::GetStringHeight(0.5f, V_STRING), 0.5f, Config::TxtColor, V_STRING); } + if (Config::UseBars == true) { + if (Config::getBool("GODMODE")) { + Gui::DrawStringCentered(0, 218, 0.7f, Config::TxtColor, Lang::get("GODMODE") + Lang::get("YES"), 400); + } else { + Gui::DrawStringCentered(0, 218, 0.7f, Config::TxtColor, Lang::get("GODMODE") + Lang::get("NO"), 400); + } + } else { + if (Config::getBool("GODMODE")) { + Gui::DrawStringCentered(0, 218, 0.7f, Config::TxtColor, Lang::get("GODMODE") + Lang::get("YES"), 400); + } else { + Gui::DrawStringCentered(0, 218, 0.7f, Config::TxtColor, Lang::get("GODMODE") + Lang::get("NO"), 400); + } + } + if (fadealpha > 0) Gui::Draw_Rect(0, 0, 400, 240, C2D_Color32(0, 0, 0, fadealpha)); // Fade in out effect GFX::DrawBottom(); GFX::DrawArrow(0, 218, 0, 1); diff --git a/source/utils/scriptHelper.cpp b/source/utils/scriptHelper.cpp index d32fbc6..36a9482 100644 --- a/source/utils/scriptHelper.cpp +++ b/source/utils/scriptHelper.cpp @@ -151,18 +151,22 @@ bool ScriptHelper::checkIfValid(std::string scriptFile, int mode) { } void ScriptHelper::deleteTitle(const std::string TitleID, bool isNAND, std::string message) { - std::string MSG = Lang::get("DELETE_TITLE") + "\n\n"; - if (isNAND) MSG += Lang::get("MEDIATYPE_NAND") + "\n" + TitleID; - else MSG += Lang::get("MEDIATYPE_SD") + "\n" + TitleID; - u64 ID = std::stoull(TitleID, 0, 16); - if (Msg::promptMsg(MSG)) { - if (isNAND == true) { - Msg::DisplayMsg(message); - deletePrevious(ID, MEDIATYPE_NAND); - } else { - Msg::DisplayMsg(message); - deletePrevious(ID, MEDIATYPE_SD); + if (Config::getBool("GODMODE")) { + std::string MSG = Lang::get("DELETE_TITLE") + "\n\n"; + if (isNAND) MSG += Lang::get("MEDIATYPE_NAND") + "\n" + TitleID; + else MSG += Lang::get("MEDIATYPE_SD") + "\n" + TitleID; + u64 ID = std::stoull(TitleID, 0, 16); + if (Msg::promptMsg(MSG)) { + if (isNAND == true) { + Msg::DisplayMsg(message); + deletePrevious(ID, MEDIATYPE_NAND); + } else { + Msg::DisplayMsg(message); + deletePrevious(ID, MEDIATYPE_SD); + } } + } else { + Msg::DisplayWarnMsg(Lang::get("FUNCTION_NOT_ALLOWED")); } }