mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
v2.1.0 can come!
This commit is contained in:
@@ -58,7 +58,7 @@ using json = nlohmann::json;
|
||||
|
||||
extern char * arg0;
|
||||
|
||||
#define WORKING_DIR "/"
|
||||
#define WORKING_DIR "/"
|
||||
#define SCRIPTS_PATH "sdmc:/3ds/Universal-Updater/scripts/" // The Scripts will be here.
|
||||
#define MUSIC_PATH "sdmc:/3ds/Universal-Updater/Music.wav" // Default Music File / Path.
|
||||
#define SCRIPT_VERSION 2
|
||||
#define MUSIC_PATH "sdmc:/3ds/Universal-Updater/Music.wav" // Default Music File / Path.
|
||||
#define SCRIPT_VERSION 3
|
||||
@@ -55,7 +55,7 @@ void FTPScreen::Draw(void) const
|
||||
Gui::clearTextBufs();
|
||||
C3D_FrameBegin(C3D_FRAME_SYNCDRAW);
|
||||
Gui::DrawTop();
|
||||
Gui::DrawString((400-Gui::GetStringWidth(0.8f, Lang::get("FTP_MODE")))/2, 0, 0.8f, Config::TxtColor, Lang::get("FTP_MODE"), 400);
|
||||
Gui::DrawString((400-Gui::GetStringWidth(0.7f, Lang::get("FTP_MODE")))/2, 0, 0.7f, Config::TxtColor, Lang::get("FTP_MODE"), 400);
|
||||
Gui::DrawBottom();
|
||||
Gui::DrawArrow(0, 218, 0, 1);
|
||||
ret = ACU_GetWifiStatus(&wifiStatus);
|
||||
@@ -76,7 +76,7 @@ void FTPScreen::Draw(void) const
|
||||
}
|
||||
|
||||
Gui::DrawStringCentered(0, 60, 0.48, Config::TxtColor, buf, 320);
|
||||
Gui::DrawStringCentered(0, 220, 0.48f, Config::TxtColor, Lang::get("B_FTP_EXIT"), 320);
|
||||
Gui::DrawStringCentered(0, 222, 0.48f, Config::TxtColor, Lang::get("B_FTP_EXIT"), 320);
|
||||
|
||||
Gui::clearTextBufs();
|
||||
C3D_FrameEnd(0);
|
||||
|
||||
@@ -50,8 +50,8 @@ bool isTesting = false;
|
||||
|
||||
void MainMenu::Draw(void) const {
|
||||
Gui::DrawTop();
|
||||
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, "Universal-Updater", 400);
|
||||
Gui::DrawString(397-Gui::GetStringWidth(0.5f, V_STRING), 237-Gui::GetStringHeight(0.5f, V_STRING), 0.5f, Config::TxtColor, V_STRING);
|
||||
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400);
|
||||
Gui::DrawString(397-Gui::GetStringWidth(0.5f, V_STRING), 239-Gui::GetStringHeight(0.5f, V_STRING), 0.5f, Config::TxtColor, V_STRING);
|
||||
if (fadealpha > 0) Gui::Draw_Rect(0, 0, 400, 240, C2D_Color32(0, 0, 0, fadealpha)); // Fade in out effect
|
||||
Gui::DrawBottom();
|
||||
Gui::DrawArrow(0, 218, 0, 1);
|
||||
|
||||
@@ -114,16 +114,16 @@ void ScriptBrowse::Draw(void) const {
|
||||
revision += " / ";
|
||||
revision += std::to_string(int64_t(infoJson[selection]["revision"]));
|
||||
|
||||
Gui::DrawString(397-Gui::GetStringWidth(0.6f, revision), 237-Gui::GetStringHeight(0.6f, revision), 0.6f, Config::TxtColor, revision);
|
||||
Gui::DrawStringCentered(0, 0, 0.8f, Config::TxtColor, std::string(infoJson[selection]["title"]), 400);
|
||||
Gui::DrawString(397-Gui::GetStringWidth(0.6f, revision), 239-Gui::GetStringHeight(0.6f, revision), 0.6f, Config::TxtColor, revision);
|
||||
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, std::string(infoJson[selection]["title"]), 400);
|
||||
|
||||
Gui::DrawStringCentered(0, 120, 0.6f, Config::TxtColor, std::string(infoJson[selection]["shortDesc"]), 400);
|
||||
if(infoJson[selection]["curRevision"] < infoJson[selection]["revision"]) {
|
||||
Gui::DrawStringCentered(0, 217, 0.7f, Config::TxtColor, Lang::get("OUTDATED_SCRIPT"), 400);
|
||||
Gui::DrawStringCentered(0, 219, 0.7f, Config::TxtColor, Lang::get("OUTDATED_SCRIPT"), 400);
|
||||
} else if(infoJson[selection]["curRevision"] == infoJson[selection]["revision"]) {
|
||||
Gui::DrawStringCentered(0, 217, 0.7f, Config::TxtColor, Lang::get("UP-TO-DATE"), 400);
|
||||
Gui::DrawStringCentered(0, 219, 0.7f, Config::TxtColor, Lang::get("UP-TO-DATE"), 400);
|
||||
} else if(infoJson[selection]["curRevision"] > infoJson[selection]["revision"]) {
|
||||
Gui::DrawStringCentered(0, 217, 0.7f, Config::TxtColor, Lang::get("FUTURE_SCRIPT"), 400);
|
||||
Gui::DrawStringCentered(0, 219, 0.7f, Config::TxtColor, Lang::get("FUTURE_SCRIPT"), 400);
|
||||
}
|
||||
Gui::DrawBottom();
|
||||
Gui::DrawArrow(295, -1);
|
||||
@@ -134,7 +134,7 @@ void ScriptBrowse::Draw(void) const {
|
||||
Gui::spriteBlend(sprites_view_idx, arrowPos[4].x, arrowPos[4].y);
|
||||
//Gui::spriteBlend(sprites_search_idx, arrowPos[5].x, arrowPos[5].y);
|
||||
|
||||
Gui::DrawStringCentered(-23, 3, 0.6f, Config::TxtColor, std::to_string(selection + 1) + " / " + maxScripts);
|
||||
Gui::DrawStringCentered(-23, 1, 0.6f, Config::TxtColor, std::to_string(selection + 1) + " / " + maxScripts);
|
||||
|
||||
if (Config::viewMode == 0) {
|
||||
for(int i=0;i<ENTRIES_PER_SCREEN && i<(int)infoJson.size();i++) {
|
||||
|
||||
@@ -278,8 +278,8 @@ void ScriptList::DrawList(void) const {
|
||||
std::string line2;
|
||||
std::string scriptAmount = std::to_string(selection +1) + " / " + std::to_string(fileInfo.size());
|
||||
Gui::DrawTop();
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, Config::TxtColor, "Universal-Updater", 400);
|
||||
Gui::DrawString(397-Gui::GetStringWidth(0.6f, scriptAmount), 237-Gui::GetStringHeight(0.6f, scriptAmount), 0.6f, Config::TxtColor, scriptAmount);
|
||||
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400);
|
||||
Gui::DrawString(397-Gui::GetStringWidth(0.6f, scriptAmount), 239-Gui::GetStringHeight(0.6f, scriptAmount), 0.6f, Config::TxtColor, scriptAmount);
|
||||
|
||||
Gui::DrawStringCentered(0, 80, 0.7f, Config::TxtColor, Lang::get("TITLE") + std::string(fileInfo[selection].title), 400);
|
||||
Gui::DrawStringCentered(0, 100, 0.7f, Config::TxtColor, Lang::get("AUTHOR") + std::string(fileInfo[selection].author), 400);
|
||||
@@ -337,8 +337,8 @@ void ScriptList::DrawSingleObject(void) const {
|
||||
std::string info;
|
||||
std::string entryAmount = std::to_string(selection2+1) + " / " + std::to_string(fileInfo2.size());
|
||||
Gui::DrawTop();
|
||||
Gui::DrawStringCentered(0, 0, 0.8f, TextColor, selectedTitle, 400);
|
||||
Gui::DrawString(397-Gui::GetStringWidth(0.6f, entryAmount), 237-Gui::GetStringHeight(0.6f, entryAmount), 0.6f, Config::TxtColor, entryAmount);
|
||||
Gui::DrawStringCentered(0, 0, 0.7f, TextColor, selectedTitle, 400);
|
||||
Gui::DrawString(397-Gui::GetStringWidth(0.6f, entryAmount), 239-Gui::GetStringHeight(0.6f, entryAmount), 0.6f, Config::TxtColor, entryAmount);
|
||||
for(uint i=0;i<lines.size();i++) {
|
||||
Gui::DrawStringCentered(0, 120-((lines.size()*20)/2)+i*20, 0.6f, TextColor, lines[i], 400);
|
||||
}
|
||||
|
||||
+23
-23
@@ -53,7 +53,7 @@ void Settings::Draw(void) const {
|
||||
|
||||
void Settings::DrawSubMenu(void) const {
|
||||
Gui::DrawTop();
|
||||
Gui::DrawString((400-Gui::GetStringWidth(0.8f, "Universal-Updater"))/2, 2, 0.8f, Config::TxtColor, "Universal-Updater", 400);
|
||||
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400);
|
||||
Gui::DrawBottom();
|
||||
Gui::DrawArrow(0, 218, 0, 1);
|
||||
|
||||
@@ -72,7 +72,7 @@ void Settings::DrawSubMenu(void) const {
|
||||
|
||||
void Settings::DrawLanguageSelection(void) const {
|
||||
Gui::DrawTop();
|
||||
Gui::DrawString((400-Gui::GetStringWidth(0.8f, Lang::get("SELECT_LANG")))/2, 2, 0.8f, Config::TxtColor, Lang::get("SELECT_LANG"), 400);
|
||||
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("SELECT_LANG"), 400);
|
||||
Gui::DrawBottom();
|
||||
Gui::DrawArrow(0, 218, 0, 1);
|
||||
|
||||
@@ -99,7 +99,7 @@ void Settings::DrawLanguageSelection(void) const {
|
||||
|
||||
void Settings::DrawColorChanging(void) const {
|
||||
Gui::DrawTop();
|
||||
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, "Universal-Updater", 400);
|
||||
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400);
|
||||
|
||||
if (colorMode == 3) {
|
||||
Gui::Draw_Rect(0, 40, 400, 45, Config::SelectedColor);
|
||||
@@ -124,17 +124,17 @@ void Settings::DrawColorChanging(void) const {
|
||||
|
||||
for (int i = 0; i < 7; i++) {
|
||||
if (colorMode == i) {
|
||||
Gui::Draw_Rect(54 + i * 25, 5, 16, 16, C2D_Color32(140, 140, 140, 255));
|
||||
Gui::Draw_Rect(54 + i * 25, 2, 16, 16, C2D_Color32(140, 140, 140, 255));
|
||||
}
|
||||
}
|
||||
|
||||
Gui::DrawString(58 + 0 * 25, 5, 0.5f, WHITE, "1", 400);
|
||||
Gui::DrawString(58 + 1 * 25, 5, 0.5f, WHITE, "2", 400);
|
||||
Gui::DrawString(58 + 2 * 25, 5, 0.5f, WHITE, "3", 400);
|
||||
Gui::DrawString(58 + 3 * 25, 5, 0.5f, WHITE, "4", 400);
|
||||
Gui::DrawString(58 + 4 * 25, 5, 0.5f, WHITE, "5", 400);
|
||||
Gui::DrawString(58 + 5 * 25, 5, 0.5f, WHITE, "6", 400);
|
||||
Gui::DrawString(58 + 6 * 25, 5, 0.5f, WHITE, "7", 400);
|
||||
Gui::DrawString(58 + 0 * 25, 2, 0.5f, WHITE, "1", 400);
|
||||
Gui::DrawString(58 + 1 * 25, 2, 0.5f, WHITE, "2", 400);
|
||||
Gui::DrawString(58 + 2 * 25, 2, 0.5f, WHITE, "3", 400);
|
||||
Gui::DrawString(58 + 3 * 25, 2, 0.5f, WHITE, "4", 400);
|
||||
Gui::DrawString(58 + 4 * 25, 2, 0.5f, WHITE, "5", 400);
|
||||
Gui::DrawString(58 + 5 * 25, 2, 0.5f, WHITE, "6", 400);
|
||||
Gui::DrawString(58 + 6 * 25, 2, 0.5f, WHITE, "7", 400);
|
||||
|
||||
Gui::Draw_Rect(buttons[0].x, buttons[0].y, 95, 41, C2D_Color32(255, 0, 0, 255));
|
||||
Gui::Draw_Rect(buttons[1].x, buttons[1].y, 95, 41, C2D_Color32(0, 255, 0, 255));
|
||||
@@ -184,22 +184,22 @@ void Settings::DrawCreditsScreen(void) const {
|
||||
std::string title = "Universal-Updater - ";
|
||||
title += Lang::get("CREDITS");
|
||||
|
||||
Gui::DrawString((400-Gui::GetStringWidth(0.8f, title.c_str()))/2, 0, 0.8f, Config::TxtColor, title.c_str(), 400);
|
||||
Gui::DrawString((400-Gui::GetStringWidth(0.8f, Lang::get("DEVELOPED_BY")))/2, 40, 0.8f, Config::TxtColor, Lang::get("DEVELOPED_BY"), 400);
|
||||
Gui::DrawString((400-Gui::GetStringWidth(0.8f, Lang::get("MAIN_DEV")))/2, 70, 0.8f, Config::TxtColor, Lang::get("MAIN_DEV"), 400);
|
||||
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, title, 400);
|
||||
Gui::DrawStringCentered(0, 40, 0.8f, Config::TxtColor, Lang::get("DEVELOPED_BY"), 400);
|
||||
Gui::DrawStringCentered(0, 70, 0.8f, Config::TxtColor, Lang::get("MAIN_DEV"), 400);
|
||||
Gui::sprite(sprites_voltZ_idx, 150, 115);
|
||||
std::string currentVersion = Lang::get("CURRENT_VERSION");
|
||||
currentVersion += V_STRING;
|
||||
Gui::DrawString(395-Gui::GetStringWidth(0.72f, currentVersion), 218, 0.72f, Config::TxtColor, currentVersion, 400);
|
||||
Gui::DrawString(395-Gui::GetStringWidth(0.70f, currentVersion), 219, 0.70f, Config::TxtColor, currentVersion, 400);
|
||||
Gui::DrawBottom();
|
||||
Gui::DrawArrow(0, 218, 0, 1);
|
||||
Gui::DrawString((320-Gui::GetStringWidth(0.7f, Lang::get("MANY_THANKS")))/2, 1, 0.8f, Config::TxtColor, Lang::get("MANY_THANKS"), 320);
|
||||
Gui::DrawString((320-Gui::GetStringWidth(0.7f, Lang::get("TRANSLATORS")))/2, 40, 0.7f, Config::TxtColor, Lang::get("TRANSLATORS"), 320);
|
||||
Gui::DrawString((320-Gui::GetStringWidth(0.5f, Lang::get("HELP_TRANSLATE")))/2, 70, 0.5f, Config::TxtColor, Lang::get("HELP_TRANSLATE"), 320);
|
||||
Gui::DrawString((320-Gui::GetStringWidth(0.7f, "Pk11"))/2, 100, 0.7f, Config::TxtColor, "Pk11", 320);
|
||||
Gui::DrawString((320-Gui::GetStringWidth(0.5f, Lang::get("HELP_OUT")))/2, 130, 0.5f, Config::TxtColor, Lang::get("HELP_OUT"), 320);
|
||||
Gui::DrawString((320-Gui::GetStringWidth(0.7f, Lang::get("SCRIPTCREATORS")))/2, 160, 0.7f, Config::TxtColor, Lang::get("SCRIPTCREATORS"), 320);
|
||||
Gui::DrawString((320-Gui::GetStringWidth(0.5f, Lang::get("CREATING_SCRIPTS")))/2, 190, 0.5f, Config::TxtColor, Lang::get("CREATING_SCRIPTS"), 320);
|
||||
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("MANY_THANKS"), 320);
|
||||
Gui::DrawStringCentered(0, 40, 0.7f, Config::TxtColor, Lang::get("TRANSLATORS"), 320);
|
||||
Gui::DrawStringCentered(0, 70, 0.5f, Config::TxtColor, Lang::get("HELP_TRANSLATE"), 320);
|
||||
Gui::DrawStringCentered(0, 100, 0.7f, Config::TxtColor, "Pk11", 320);
|
||||
Gui::DrawStringCentered(0, 130, 0.5f, Config::TxtColor, Lang::get("HELP_OUT"), 320);
|
||||
Gui::DrawStringCentered(0, 160, 0.7f, Config::TxtColor, Lang::get("SCRIPTCREATORS"), 320);
|
||||
Gui::DrawStringCentered(0, 190, 0.5f, Config::TxtColor, Lang::get("CREATING_SCRIPTS"), 320);
|
||||
Gui::DrawString((320-Gui::GetStringWidth(0.55, discordText ? Lang::get("SHOW_QR") : Lang::get("LINK")))/2, 220, 0.55, Config::TxtColor, discordText ? Lang::get("SHOW_QR") : Lang::get("LINK"), 320);
|
||||
} else if (DisplayMode == 2) {
|
||||
Gui::DrawTop();
|
||||
@@ -318,7 +318,7 @@ void Settings::colorChanging(u32 hDown, touchPosition touch) {
|
||||
|
||||
if (hDown & KEY_TOUCH) {
|
||||
for (int i = 0; i < 7; i++) {
|
||||
if(touch.px > 54 + i * 25 && touch.px < 54 + i * 25+16 && touch.py > 5 && touch.py < 5+16) {
|
||||
if(touch.px > 54 + i * 25 && touch.px < 54 + i * 25+16 && touch.py > 2 && touch.py < 2+16) {
|
||||
colorMode = i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,9 +92,9 @@ void TinyDB::Draw(void) const {
|
||||
Gui::DrawStringCentered(0, 125, 0.6f, Config::TxtColor, Lang::get("RELEASE_ID") + std::string(tinyDBJson[selectedOption]["info"]["releaseId"]), 400);
|
||||
Gui::DrawStringCentered(0, 155, 0.6f, Config::TxtColor, Lang::get("TITLE_ID") + std::string(tinyDBJson[selectedOption]["info"]["titleid"]), 400);
|
||||
Gui::DrawStringCentered(0, 185, 0.6f, Config::TxtColor, Lang::get("FILE_SIZE") + formatBytes(int64_t(tinyDBJson[selectedOption]["info"]["fileSize"])), 400);
|
||||
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, "TinyDB", 400);
|
||||
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "TinyDB", 400);
|
||||
std::string entryAmount = std::to_string(selection+1) + " / " + std::to_string(tinyDBList.size());
|
||||
Gui::DrawString(397-Gui::GetStringWidth(0.6f, entryAmount), 237-Gui::GetStringHeight(0.6f, entryAmount), 0.6f, Config::TxtColor, entryAmount);
|
||||
Gui::DrawString(397-Gui::GetStringWidth(0.6f, entryAmount), 239-Gui::GetStringHeight(0.6f, entryAmount), 0.6f, Config::TxtColor, entryAmount);
|
||||
|
||||
|
||||
Gui::setDraw(bottom);
|
||||
|
||||
Reference in New Issue
Block a user