diff --git a/assets/gfx/sprites.t3s b/assets/gfx/sprites.t3s index b025216..55e714e 100644 --- a/assets/gfx/sprites.t3s +++ b/assets/gfx/sprites.t3s @@ -1,5 +1,9 @@ --atlas -f rgba -z auto +sprites/bottom_screen_bot.png +sprites/bottom_screen_top.png +sprites/top_screen_bot.png +sprites/top_screen_top.png sprites/search.png sprites/credits/discord.png diff --git a/assets/gfx/sprites/bottom_screen_bot.png b/assets/gfx/sprites/bottom_screen_bot.png new file mode 100644 index 0000000..961ea84 Binary files /dev/null and b/assets/gfx/sprites/bottom_screen_bot.png differ diff --git a/assets/gfx/sprites/bottom_screen_top.png b/assets/gfx/sprites/bottom_screen_top.png new file mode 100644 index 0000000..1520b3b Binary files /dev/null and b/assets/gfx/sprites/bottom_screen_top.png differ diff --git a/assets/gfx/sprites/top_screen_bot.png b/assets/gfx/sprites/top_screen_bot.png new file mode 100644 index 0000000..1e0e3aa Binary files /dev/null and b/assets/gfx/sprites/top_screen_bot.png differ diff --git a/assets/gfx/sprites/top_screen_top.png b/assets/gfx/sprites/top_screen_top.png new file mode 100644 index 0000000..7e917f9 Binary files /dev/null and b/assets/gfx/sprites/top_screen_top.png differ diff --git a/include/screens/settings.hpp b/include/screens/settings.hpp index 73d7cd0..42ab939 100644 --- a/include/screens/settings.hpp +++ b/include/screens/settings.hpp @@ -83,7 +83,7 @@ private: }; std::vector barPos = { - {0, 210, 320, 30, -1}, + {0, 215, 320, 25, -1}, }; }; diff --git a/source/download/download.cpp b/source/download/download.cpp index 2e43a01..3e0a903 100644 --- a/source/download/download.cpp +++ b/source/download/download.cpp @@ -701,7 +701,7 @@ void displayProgressBar() { C2D_TargetClear(top, BLACK); C2D_TargetClear(bottom, BLACK); Gui::DrawTop(); - Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, progressBarMsg, 400); + Gui::DrawStringCentered(0, 1, 0.7f, Config::TxtColor, progressBarMsg, 400); Gui::DrawStringCentered(0, 80, 0.6f, Config::TxtColor, str, 400); Gui::Draw_Rect(30, 120, 340, 30, BLACK); diff --git a/source/gui.cpp b/source/gui.cpp index 6451f5f..620bdda 100644 --- a/source/gui.cpp +++ b/source/gui.cpp @@ -107,9 +107,9 @@ void Gui::DisplayWarnMsg(std::string Text) C2D_TargetClear(bottom, BLACK); Gui::DrawTop(); if (isScriptSelected == false) { - Gui::DrawStringCentered(0, 2, 0.6f, Config::TxtColor, Text, 400); + Gui::DrawStringCentered(0, 1, 0.6f, Config::TxtColor, Text, 400); } else if (isScriptSelected == true) { - Gui::DrawStringCentered(0, 2, 0.6f, TextColor, Text, 400); + Gui::DrawStringCentered(0, 1, 0.6f, TextColor, Text, 400); } Gui::DrawBottom(); C3D_FrameEnd(0); @@ -190,26 +190,34 @@ void Gui::ScreenDraw(C3D_RenderTarget * screen) void Gui::DrawTop(void) { Gui::ScreenDraw(top); if (isScriptSelected == false) { - Gui::Draw_Rect(0, 0, 400, 30, Config::Color1); - Gui::Draw_Rect(0, 30, 400, 180, Config::Color2); - Gui::Draw_Rect(0, 210, 400, 30, Config::Color1); + Gui::Draw_Rect(0, 0, 400, 25, Config::Color1); + Gui::Draw_Rect(0, 25, 400, 190, Config::Color2); + Gui::Draw_Rect(0, 215, 400, 25, Config::Color1); + Gui::sprite(sprites_top_screen_top_idx, 0, 0); + Gui::sprite(sprites_top_screen_bot_idx, 0, 215); } else if (isScriptSelected == true) { Gui::Draw_Rect(0, 0, 400, 30, barColor); - Gui::Draw_Rect(0, 30, 400, 180, bgTopColor); - Gui::Draw_Rect(0, 210, 400, 30, barColor); + Gui::Draw_Rect(0, 25, 400, 190, bgBottomColor); + Gui::Draw_Rect(0, 215, 400, 25, barColor); + Gui::sprite(sprites_top_screen_top_idx, 0, 0); + Gui::sprite(sprites_top_screen_bot_idx, 0, 215); } } void Gui::DrawBottom(void) { Gui::ScreenDraw(bottom); if (isScriptSelected == false) { - Gui::Draw_Rect(0, 0, 400, 30, Config::Color1); - Gui::Draw_Rect(0, 30, 400, 180, Config::Color3); - Gui::Draw_Rect(0, 210, 400, 30, Config::Color1); + Gui::Draw_Rect(0, 0, 320, 25, Config::Color1); + Gui::Draw_Rect(0, 25, 320, 190, Config::Color3); + Gui::Draw_Rect(0, 215, 320, 25, Config::Color1); + Gui::sprite(sprites_bottom_screen_top_idx, 0, 0); + Gui::sprite(sprites_bottom_screen_bot_idx, 0, 215); } else if (isScriptSelected == true) { - Gui::Draw_Rect(0, 0, 400, 30, barColor); - Gui::Draw_Rect(0, 30, 400, 180, bgBottomColor); - Gui::Draw_Rect(0, 210, 400, 30, barColor); + Gui::Draw_Rect(0, 0, 320, 30, barColor); + Gui::Draw_Rect(0, 25, 320, 190, bgBottomColor); + Gui::Draw_Rect(0, 215, 320, 25, barColor); + Gui::sprite(sprites_bottom_screen_top_idx, 0, 0); + Gui::sprite(sprites_bottom_screen_bot_idx, 0, 215); } } @@ -223,10 +231,10 @@ bool Gui::promptMsg(std::string promptMsg) Gui::DrawTop(); if (isScriptSelected == false) { Gui::DrawString((400-Gui::GetStringWidth(0.6f, promptMsg.c_str()))/2, 100, 0.6f, Config::TxtColor, promptMsg.c_str(), 400); - Gui::DrawString((400-Gui::GetStringWidth(0.72f, Lang::get("CONFIRM_OR_CANCEL")))/2, 214, 0.72f, Config::TxtColor, Lang::get("CONFIRM_OR_CANCEL"), 400); + Gui::DrawString((400-Gui::GetStringWidth(0.72f, Lang::get("CONFIRM_OR_CANCEL")))/2, 217, 0.72f, Config::TxtColor, Lang::get("CONFIRM_OR_CANCEL"), 400); } else if (isScriptSelected == true) { Gui::DrawString((400-Gui::GetStringWidth(0.6f, promptMsg.c_str()))/2, 100, 0.6f, TextColor, promptMsg.c_str(), 400); - Gui::DrawString((400-Gui::GetStringWidth(0.72f, Lang::get("CONFIRM_OR_CANCEL")))/2, 214, 0.72f, TextColor, Lang::get("CONFIRM_OR_CANCEL"), 400); + Gui::DrawString((400-Gui::GetStringWidth(0.72f, Lang::get("CONFIRM_OR_CANCEL")))/2, 217, 0.72f, TextColor, Lang::get("CONFIRM_OR_CANCEL"), 400); } Gui::DrawBottom(); C3D_FrameEnd(0); diff --git a/source/screens/ftpScreen.cpp b/source/screens/ftpScreen.cpp index ad8776e..dbe9478 100644 --- a/source/screens/ftpScreen.cpp +++ b/source/screens/ftpScreen.cpp @@ -52,7 +52,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, 2, 0.8f, Config::TxtColor, Lang::get("FTP_MODE"), 400); + Gui::DrawString((400-Gui::GetStringWidth(0.8f, Lang::get("FTP_MODE")))/2, 0, 0.8f, Config::TxtColor, Lang::get("FTP_MODE"), 400); Gui::DrawBottom(); ret = ACU_GetWifiStatus(&wifiStatus); diff --git a/source/screens/scriptBrowse.cpp b/source/screens/scriptBrowse.cpp index 7c6e36c..273911e 100644 --- a/source/screens/scriptBrowse.cpp +++ b/source/screens/scriptBrowse.cpp @@ -116,21 +116,20 @@ void ScriptBrowse::Draw(void) const { 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, 3, 0.8f, Config::TxtColor, std::string(infoJson[selection]["title"]), 400); + Gui::DrawStringCentered(0, 0, 0.8f, 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, 215, 0.7f, Config::TxtColor, Lang::get("OUTDATED_SCRIPT"), 400); + Gui::DrawStringCentered(0, 217, 0.7f, Config::TxtColor, Lang::get("OUTDATED_SCRIPT"), 400); } else if(infoJson[selection]["curRevision"] == infoJson[selection]["revision"]) { - Gui::DrawStringCentered(0, 215, 0.7f, Config::TxtColor, Lang::get("UP-TO-DATE"), 400); + Gui::DrawStringCentered(0, 217, 0.7f, Config::TxtColor, Lang::get("UP-TO-DATE"), 400); } else if(infoJson[selection]["curRevision"] > infoJson[selection]["revision"]) { - Gui::DrawStringCentered(0, 215, 0.7f, Config::TxtColor, Lang::get("FUTURE_SCRIPT"), 400); + Gui::DrawStringCentered(0, 217, 0.7f, Config::TxtColor, Lang::get("FUTURE_SCRIPT"), 400); } Gui::DrawBottom(); - Gui::Draw_Rect(0, 0, 27, 30, WHITE); Gui::sprite(sprites_search_idx, -3, 0); Gui::DrawString(7.5, 1.5, 0.72f, BLACK, "\uE003"); - Gui::DrawString(317-Gui::GetStringWidth(0.6f, std::to_string(selection + 1) + " / " + maxScripts), 4, 0.6f, Config::TxtColor, std::to_string(selection + 1) + " / " + maxScripts); + Gui::DrawString(317-Gui::GetStringWidth(0.6f, std::to_string(selection + 1) + " / " + maxScripts), 3, 0.6f, Config::TxtColor, std::to_string(selection + 1) + " / " + maxScripts); if (Config::viewMode == 0) { for(int i=0;i