Switch over to Universal-Core. (#18)

* Don't build here.

* WIP: Switch to Universal-Core.

* Update Submodule repo & azure-pipelines.
This commit is contained in:
StackZ
2020-02-08 06:20:50 +01:00
committed by GitHub
parent 0ef5d2c5ab
commit 09be8e0b94
55 changed files with 1064 additions and 1327 deletions
+12 -14
View File
@@ -24,38 +24,36 @@
* reasonable ways as different from the original version.
*/
#include "screens/credits.hpp"
#include "utils/config.hpp"
#include "credits.hpp"
extern bool touching(touchPosition touch, Structs::ButtonPos button);
void Credits::Draw(void) const {
std::string title = "Universal-Updater - ";
title += Lang::get("CREDITS");
Gui::DrawTop();
GFX::DrawTop();
if (creditsPage != 4) {
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, title, 400);
} else {
Gui::DrawStringCentered(0, 2, 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_stackZ_idx, 150, 95);
Gui::DrawStringCentered(0, 30, 0.7f, Config::TxtColor, Lang::get("DEVELOPED_BY"), 390);
Gui::DrawStringCentered(0, 70, 0.7f, Config::TxtColor, Lang::get("MAIN_DEV"), 390);
GFX::DrawSprite(sprites_stackZ_idx, 120, 105);
std::string currentVersion = Lang::get("CURRENT_VERSION");
currentVersion += V_STRING;
Gui::DrawString(395-Gui::GetStringWidth(0.70f, currentVersion), 219, 0.70f, Config::TxtColor, currentVersion, 400);
} else {
Gui::Draw_Rect(0, 0, 400, 240, C2D_Color32(0, 0, 0, 190));
Gui::sprite(sprites_discord_idx, 115, 35);
GFX::DrawSprite(sprites_discord_idx, 115, 35);
}
Gui::DrawBottom();
GFX::DrawBottom();
if (creditsPage != 4) {
Gui::DrawArrow(0, 218, 0, 1);
Gui::DrawArrow(318, 240, 180.0, 1);
GFX::DrawArrow(0, 218, 0, 1);
GFX::DrawArrow(318, 240, 180.0, 1);
}
if (creditsPage == 1) {
@@ -77,14 +75,14 @@ void Credits::Draw(void) const {
} else if (creditsPage == 4) {
Gui::Draw_Rect(0, 0, 320, 240, C2D_Color32(0, 0, 0, 190));
Gui::DrawStringCentered(0, -2, 0.55f, Config::TxtColor, Lang::get("LINK"), 320);
Gui::DrawArrow(0, 218, 0, 1);
GFX::DrawArrow(0, 218, 0, 1);
}
}
void Credits::Logic(u32 hDown, u32 hHeld, touchPosition touch) {
if ((hDown & KEY_LEFT || hDown & KEY_L) || (hDown & KEY_TOUCH && touching(touch, arrowPos[0]))) {
if (creditsPage == 1) {
Screen::back();
Gui::screenBack();
return;
} else if (creditsPage > 1) {
creditsPage--;
@@ -96,7 +94,7 @@ void Credits::Logic(u32 hDown, u32 hHeld, touchPosition touch) {
}
if (hDown & KEY_B) {
Screen::back();
Gui::screenBack();
return;
}
}
+5 -9
View File
@@ -24,12 +24,8 @@
* reasonable ways as different from the original version.
*/
#include "lang/lang.hpp"
#include "screens/ftpScreen.hpp"
#include "screens/screenCommon.hpp"
#include "utils/config.hpp"
#include "ftpScreen.hpp"
#include <algorithm>
#include <fstream>
@@ -54,14 +50,14 @@ void FTPScreen::Draw(void) const
ftp_loop();
Gui::clearTextBufs();
C3D_FrameBegin(C3D_FRAME_SYNCDRAW);
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawString((400-Gui::GetStringWidth(0.7f, Lang::get("FTP_MODE")))/2, 0, 0.7f, Config::TxtColor, Lang::get("FTP_MODE"), 400);
} else {
Gui::DrawString((400-Gui::GetStringWidth(0.7f, Lang::get("FTP_MODE")))/2, 2, 0.7f, Config::TxtColor, Lang::get("FTP_MODE"), 400);
}
Gui::DrawBottom();
Gui::DrawArrow(0, 218, 0, 1);
GFX::DrawBottom();
GFX::DrawArrow(0, 218, 0, 1);
ret = ACU_GetWifiStatus(&wifiStatus);
if ((wifiStatus != 0) && R_SUCCEEDED(ret)) {
@@ -95,7 +91,7 @@ void FTPScreen::Draw(void) const
memset(ftp_file_transfer, 0, 50); // Empty transfer status.
ftp_exit();
Screen::back();
Gui::screenBack();
return;
}
+19 -20
View File
@@ -24,13 +24,12 @@
* reasonable ways as different from the original version.
*/
#include "screens/ftpScreen.hpp"
#include "screens/mainMenu.hpp"
#include "screens/scriptlist.hpp"
#include "screens/settings.hpp"
#include "screens/unistore.hpp"
#include "utils/config.hpp"
#include "config.hpp"
#include "ftpScreen.hpp"
#include "mainMenu.hpp"
#include "scriptlist.hpp"
#include "settings.hpp"
#include "unistore.hpp"
extern bool exiting;
extern bool touching(touchPosition touch, Structs::ButtonPos button);
@@ -38,7 +37,7 @@ extern int fadealpha;
extern bool fadein;
void MainMenu::Draw(void) const {
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400);
@@ -49,13 +48,13 @@ void MainMenu::Draw(void) const {
}
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);
GFX::DrawBottom();
GFX::DrawArrow(0, 218, 0, 1);
for (int i = 0; i < 4; i++) {
Gui::Draw_Rect(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, Config::UnselectedColor);
if (Selection == i) {
Gui::drawAnimatedSelector(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, .060, TRANSPARENT, Config::SelectedColor);
}
}
@@ -65,7 +64,7 @@ void MainMenu::Draw(void) const {
Gui::DrawStringCentered(80, mainButtons[3].y+12, 0.6f, Config::TxtColor, "FTP", 130);
// Draw UniStore Icon. ;P
Gui::sprite(sprites_uniStore_idx, 10, 65);
GFX::DrawSprite(sprites_uniStore_idx, 10, 65);
if (fadealpha > 0) Gui::Draw_Rect(0, 0, 320, 240, C2D_Color32(0, 0, 0, fadealpha)); // Fade in out effect
}
@@ -88,29 +87,29 @@ void MainMenu::Logic(u32 hDown, u32 hHeld, touchPosition touch) {
if (hDown & KEY_A) {
switch(Selection) {
case 0:
Screen::set(std::make_unique<UniStore>());
Gui::setScreen(std::make_unique<UniStore>());
break;
case 1:
Screen::set(std::make_unique<ScriptList>());
Gui::setScreen(std::make_unique<ScriptList>());
break;
case 2:
Screen::set(std::make_unique<Settings>());
Gui::setScreen(std::make_unique<Settings>());
break;
case 3:
Screen::set(std::make_unique<FTPScreen>());
Gui::setScreen(std::make_unique<FTPScreen>());
break;
}
}
if (hDown & KEY_TOUCH) {
if (touching(touch, mainButtons[0])) {
Screen::set(std::make_unique<UniStore>());
Gui::setScreen(std::make_unique<UniStore>());
} else if (touching(touch, mainButtons[1])) {
Screen::set(std::make_unique<ScriptList>());
Gui::setScreen(std::make_unique<ScriptList>());
} else if (touching(touch, mainButtons[2])) {
Screen::set(std::make_unique<Settings>());
Gui::setScreen(std::make_unique<Settings>());
} else if (touching(touch, mainButtons[3])) {
Screen::set(std::make_unique<FTPScreen>());
Gui::setScreen(std::make_unique<FTPScreen>());
}
}
}
-73
View File
@@ -1,73 +0,0 @@
/*
* This file is part of Universal-Updater
* Copyright (C) 2019-2020 DeadPhoenix8091, Epicpkmn11, Flame, RocketRobz, StackZ, TotallyNotGuy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
* * Requiring preservation of specified reasonable legal notices or
* author attributions in that material or in the Appropriate Legal
* Notices displayed by works containing it.
* * Prohibiting misrepresentation of the origin of that material,
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#include "screens/screen.hpp"
#include <stack>
// Fade stuff.
int fadealpha = 255;
bool fadein = true;
std::stack<std::unique_ptr<screen>> screens;
// Set a specific Screen.
void Screen::set(std::unique_ptr<screen> screen2)
{
screens.push(std::move(screen2));
}
// Fade into another Screen, but first do a fadeout.
void Screen::fade(std::unique_ptr<screen> screen2, bool fadeout) {
if (fadeout) {
fadealpha += 6;
if (fadealpha > 255) {
fadealpha = 255;
screens.push(std::move(screen2));
fadein = true;
fadeout = false;
}
}
}
// Go a Screen back.
void Screen::back()
{
screens.pop();
}
// For the Mainloop.
void Screen::loop(u32 hDown, u32 hHeld, touchPosition touch) {
screens.top()->Draw();
screens.top()->Logic(hDown, hHeld, touch);
if (fadein == true) {
fadealpha -= 6;
if (fadealpha < 0) {
fadealpha = 0;
fadein = false;
}
}
}
+19 -21
View File
@@ -24,12 +24,10 @@
* reasonable ways as different from the original version.
*/
#include "download/download.hpp"
#include "screens/scriptBrowse.hpp"
#include "utils/fileBrowse.h"
#include "utils/json.hpp"
#include "download.hpp"
#include "fileBrowse.hpp"
#include "json.hpp"
#include "scriptBrowse.hpp"
#include <unistd.h>
@@ -94,7 +92,7 @@ void findExistingFiles(nlohmann::json &json) {
}
ScriptBrowse::ScriptBrowse() {
DisplayMsg(Lang::get("GETTING_SCRIPT_LIST"));
Msg::DisplayMsg(Lang::get("GETTING_SCRIPT_LIST"));
// Get repo info
downloadToFile("https://github.com/Universal-Team/extras/raw/scripts/info/scriptInfo.json", metaFile);
@@ -107,7 +105,7 @@ ScriptBrowse::ScriptBrowse() {
}
void ScriptBrowse::Draw(void) const {
Gui::DrawTop();
GFX::DrawTop();
std::string revision = std::to_string(int64_t(infoJson[selection]["curRevision"]));
revision += " / ";
revision += std::to_string(int64_t(infoJson[selection]["revision"]));
@@ -128,13 +126,13 @@ void ScriptBrowse::Draw(void) const {
} else if(infoJson[selection]["curRevision"] > infoJson[selection]["revision"]) {
Gui::DrawStringCentered(0, 219, 0.7f, Config::TxtColor, Lang::get("FUTURE_SCRIPT"), 370);
}
Gui::DrawBottom();
Gui::DrawArrow(295, -1);
Gui::DrawArrow(315, 240, 180.0);
Gui::DrawArrow(0, 218, 0, 1);
GFX::DrawBottom();
GFX::DrawArrow(295, -1);
GFX::DrawArrow(315, 240, 180.0);
GFX::DrawArrow(0, 218, 0, 1);
Gui::spriteBlend(sprites_download_all_idx, arrowPos[3].x, arrowPos[3].y);
Gui::spriteBlend(sprites_view_idx, arrowPos[4].x, arrowPos[4].y);
GFX::DrawSpriteBlend(sprites_download_all_idx, arrowPos[3].x, arrowPos[3].y);
GFX::DrawSpriteBlend(sprites_view_idx, arrowPos[4].x, arrowPos[4].y);
//Gui::spriteBlend(sprites_search_idx, arrowPos[5].x, arrowPos[5].y);
Gui::DrawStringCentered(-23, 1, 0.6f, Config::TxtColor, std::to_string(selection + 1) + " / " + maxScripts);
@@ -143,7 +141,7 @@ void ScriptBrowse::Draw(void) const {
for(int i=0;i<ENTRIES_PER_SCREEN && i<(int)infoJson.size();i++) {
Gui::Draw_Rect(0, 40+(i*57), 320, 45, Config::UnselectedColor);
if(screenPos + i == selection) {
Gui::drawAnimatedSelector(0, 40+(i*57), 320, 45, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(0, 40+(i*57), 320, 45, .060, TRANSPARENT, Config::SelectedColor);
}
if(infoJson[screenPos+i]["curRevision"] < infoJson[screenPos+i]["revision"]) {
@@ -158,7 +156,7 @@ void ScriptBrowse::Draw(void) const {
for(int i=0;i<ENTRIES_PER_LIST && i<(int)infoJson.size();i++) {
Gui::Draw_Rect(0, (i+1)*27, 320, 25, Config::UnselectedColor);
if(screenPosList + i == selection) {
Gui::drawAnimatedSelector(0, (i+1)*27, 320, 25, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(0, (i+1)*27, 320, 25, .060, TRANSPARENT, Config::SelectedColor);
}
if(infoJson[screenPosList+i]["curRevision"] < infoJson[screenPosList+i]["revision"]) {
Gui::Draw_Rect(302, ((i+1)*27)+7, 11, 11, C2D_Color32(0xfb, 0x5b, 0x5b, 255));
@@ -175,7 +173,7 @@ void ScriptBrowse::Logic(u32 hDown, u32 hHeld, touchPosition touch) {
if (keyRepeatDelay) keyRepeatDelay--;
if ((hDown & KEY_B) || (hDown & KEY_TOUCH && touching(touch, arrowPos[2]))) {
infoJson.clear();
Screen::back();
Gui::screenBack();
return;
}
@@ -217,7 +215,7 @@ void ScriptBrowse::Logic(u32 hDown, u32 hHeld, touchPosition touch) {
titleFix[l] = '-';
}
}
DisplayMsg(fileName);
Msg::DisplayMsg(fileName);
downloadToFile(infoJson[screenPos + i]["url"], Config::ScriptPath + titleFix + ".json");
infoJson[screenPos + i]["curRevision"] = infoJson[screenPos + i]["revision"];
}
@@ -234,7 +232,7 @@ void ScriptBrowse::Logic(u32 hDown, u32 hHeld, touchPosition touch) {
titleFix[l] = '-';
}
}
DisplayMsg(fileName);
Msg::DisplayMsg(fileName);
downloadToFile(infoJson[screenPosList + i]["url"], Config::ScriptPath + titleFix + ".json");
infoJson[screenPosList + i]["curRevision"] = infoJson[screenPosList + i]["revision"];
}
@@ -253,7 +251,7 @@ void ScriptBrowse::Logic(u32 hDown, u32 hHeld, touchPosition touch) {
titleFix[i] = '-';
}
}
DisplayMsg(fileName);
Msg::DisplayMsg(fileName);
downloadToFile(infoJson[selection]["url"], Config::ScriptPath + titleFix + ".json");
infoJson[selection]["curRevision"] = infoJson[selection]["revision"];
@@ -302,7 +300,7 @@ void ScriptBrowse::Logic(u32 hDown, u32 hHeld, touchPosition touch) {
titleFix[l] = '-';
}
}
DisplayMsg(fileName + " " + std::to_string(current) + " / " + std::to_string(total));
Msg::DisplayMsg(fileName + " " + std::to_string(current) + " / " + std::to_string(total));
downloadToFile(infoJson[i]["url"], Config::ScriptPath + titleFix + ".json");
infoJson[i]["curRevision"] = infoJson[i]["revision"];
}
+7 -10
View File
@@ -24,13 +24,10 @@
* reasonable ways as different from the original version.
*/
#include "utils/fileBrowse.hpp"
#include "keyboard.hpp"
#include "logging.hpp"
#include "screens/scriptCreator.hpp"
#include "utils/config.hpp"
#include "utils/fileBrowse.h"
#include "scriptCreator.hpp"
#include <fstream>
#include <unistd.h>
@@ -80,14 +77,14 @@ void ScriptCreator::Draw(void) const {
}
void ScriptCreator::DrawSubMenu(void) const {
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("SCRIPTCREATOR"), 400);
} else {
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, Lang::get("SCRIPTCREATOR"), 400);
}
Gui::DrawBottom();
GFX::DrawBottom();
for (int i = 0; i < 2; i++) {
if (Selection == i) {
@@ -102,14 +99,14 @@ void ScriptCreator::DrawSubMenu(void) const {
}
void ScriptCreator::DrawScriptScreen(void) const {
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Selected Entry: " + entryName, 400);
} else {
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, "Selected Entry: " + entryName, 400);
}
Gui::DrawBottom();
GFX::DrawBottom();
// Draw Page.
for (int i = 0; i < 2; i++) {
@@ -287,7 +284,7 @@ void ScriptCreator::setInfoStuff(void) {
void ScriptCreator::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
if (hDown & KEY_B) {
Screen::back();
Gui::screenBack();
return;
}
+34 -37
View File
@@ -24,14 +24,11 @@
* reasonable ways as different from the original version.
*/
#include "download/download.hpp"
#include "screens/scriptBrowse.hpp"
#include "screens/scriptCreator.hpp"
#include "screens/scriptlist.hpp"
#include "utils/config.hpp"
#include "utils/scriptHelper.hpp"
#include "download.hpp"
#include "scriptBrowse.hpp"
#include "scriptCreator.hpp"
#include "scriptHelper.hpp"
#include "scriptlist.hpp"
#include <algorithm>
#include <fstream>
@@ -82,7 +79,7 @@ void checkForValidate(void) {
fclose(file);
int ver = ScriptHelper::getNum(json, "info", "version");
if (ver < SCRIPT_VERSION || ver > SCRIPT_VERSION) {
Gui::DisplayWarnMsg(Lang::get("INCOMPATIBLE_SCRIPT"));
Msg::DisplayWarnMsg(Lang::get("INCOMPATIBLE_SCRIPT"));
}
}
@@ -190,7 +187,7 @@ void runFunctions(nlohmann::json &json) {
else missing = true;
promptmsg = Lang::get("DELETE_PROMPT") + "\n" + directory;
if(!missing) {
if (Gui::promptMsg(promptmsg)) {
if (Msg::promptMsg(promptmsg)) {
removeDirRecursive(directory.c_str());
}
}
@@ -270,20 +267,20 @@ void loadColors(nlohmann::json &json) {
}
void ScriptList::DrawSubMenu(void) const {
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("SCRIPTS_SUBMENU"), 400);
} else {
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, Lang::get("SCRIPTS_SUBMENU"), 400);
}
Gui::DrawBottom();
Gui::DrawArrow(0, 218, 0, 1);
GFX::DrawBottom();
GFX::DrawArrow(0, 218, 0, 1);
for (int i = 0; i < 4; i++) {
Gui::Draw_Rect(subPos[i].x, subPos[i].y, subPos[i].w, subPos[i].h, Config::UnselectedColor);
if (SubSelection == i) {
Gui::drawAnimatedSelector(subPos[i].x, subPos[i].y, subPos[i].w, subPos[i].h, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(subPos[i].x, subPos[i].y, subPos[i].w, subPos[i].h, .060, TRANSPARENT, Config::SelectedColor);
}
}
@@ -298,7 +295,7 @@ void ScriptList::DrawList(void) const {
std::string line1;
std::string line2;
std::string scriptAmount = std::to_string(selection +1) + " / " + std::to_string(fileInfo.size());
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
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);
@@ -310,11 +307,11 @@ void ScriptList::DrawList(void) const {
Gui::DrawStringCentered(0, 100, 0.7f, Config::TxtColor, Lang::get("AUTHOR") + std::string(fileInfo[selection].author), 400);
Gui::DrawStringCentered(0, 120, 0.6f, Config::TxtColor, std::string(fileInfo[selection].shortDesc), 400);
Gui::DrawBottom();
Gui::DrawArrow(295, -1);
Gui::DrawArrow(315, 240, 180.0);
Gui::DrawArrow(0, 218, 0, 1);
Gui::spriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y);
GFX::DrawBottom();
GFX::DrawArrow(295, -1);
GFX::DrawArrow(315, 240, 180.0);
GFX::DrawArrow(0, 218, 0, 1);
GFX::DrawSpriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y);
if (Config::viewMode == 0) {
for(int i=0;i<ENTRIES_PER_SCREEN && i<(int)fileInfo.size();i++) {
@@ -322,7 +319,7 @@ void ScriptList::DrawList(void) const {
line1 = fileInfo[screenPos + i].title;
line2 = fileInfo[screenPos + i].author;
if(screenPos + i == selection) {
Gui::drawAnimatedSelector(0, 40+(i*57), 320, 45, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(0, 40+(i*57), 320, 45, .060, TRANSPARENT, Config::SelectedColor);
}
Gui::DrawStringCentered(0, 38+(i*57), 0.7f, Config::TxtColor, line1, 320);
Gui::DrawStringCentered(0, 62+(i*57), 0.7f, Config::TxtColor, line2, 320);
@@ -332,7 +329,7 @@ void ScriptList::DrawList(void) const {
Gui::Draw_Rect(0, (i+1)*27, 320, 25, Config::UnselectedColor);
line1 = fileInfo[screenPosList + i].title;
if(screenPosList + i == selection) {
Gui::drawAnimatedSelector(0, (i+1)*27, 320, 25, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(0, (i+1)*27, 320, 25, .060, TRANSPARENT, Config::SelectedColor);
}
Gui::DrawStringCentered(0, ((i+1)*27)+1, 0.7f, Config::TxtColor, line1, 320);
}
@@ -361,7 +358,7 @@ void loadDesc(void) {
void ScriptList::DrawSingleObject(void) const {
std::string info;
std::string entryAmount = std::to_string(selection2+1) + " / " + std::to_string(fileInfo2.size());
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
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);
@@ -372,18 +369,18 @@ void ScriptList::DrawSingleObject(void) const {
for(uint i=0;i<lines.size();i++) {
Gui::DrawStringCentered(0, 120-((lines.size()*20)/2)+i*20, 0.6f, TextColor, lines[i], 400);
}
Gui::DrawBottom();
Gui::DrawArrow(295, -1);
Gui::DrawArrow(315, 240, 180.0);
Gui::DrawArrow(0, 218, 0, 1);
Gui::spriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y);
GFX::DrawBottom();
GFX::DrawArrow(295, -1);
GFX::DrawArrow(315, 240, 180.0);
GFX::DrawArrow(0, 218, 0, 1);
GFX::DrawSpriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y);
if (Config::viewMode == 0) {
for(int i=0;i<ENTRIES_PER_SCREEN && i<(int)fileInfo2.size();i++) {
Gui::Draw_Rect(0, 40+(i*57), 320, 45, unselected);
info = fileInfo2[screenPos2 + i];
if(screenPos2 + i == selection2) {
Gui::drawAnimatedSelector(0, 40+(i*57), 320, 45, .060, selected);
Gui::drawAnimatedSelector(0, 40+(i*57), 320, 45, .060, TRANSPARENT, selected);
}
Gui::DrawStringCentered(0, 50+(i*57), 0.7f, TextColor, info, 320);
}
@@ -393,7 +390,7 @@ void ScriptList::DrawSingleObject(void) const {
Gui::Draw_Rect(0, (i+1)*27, 320, 25, unselected);
info = fileInfo2[screenPosList2 + i];
if(screenPosList2 + i == selection2) {
Gui::drawAnimatedSelector(0, (i+1)*27, 320, 25, .060, selected);
Gui::drawAnimatedSelector(0, (i+1)*27, 320, 25, .060, TRANSPARENT, selected);
}
Gui::DrawStringCentered(0, ((i+1)*27)+1, 0.7f, TextColor, info, 320);
}
@@ -403,7 +400,7 @@ void ScriptList::DrawSingleObject(void) const {
void ScriptList::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
if ((hDown & KEY_B) || (hDown & KEY_TOUCH && touching(touch, arrowPos[2]))) {
Screen::back();
Gui::screenBack();
return;
}
@@ -430,19 +427,19 @@ void ScriptList::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
}
mode = 1;
} else {
Gui::DisplayWarnMsg(Lang::get("GET_SCRIPTS_FIRST"));
Msg::DisplayWarnMsg(Lang::get("GET_SCRIPTS_FIRST"));
}
break;
case 1:
if (checkWifiStatus() == true) {
Screen::set(std::make_unique<ScriptBrowse>());
Gui::setScreen(std::make_unique<ScriptBrowse>());
} else {
notConnectedMsg();
}
break;
case 2:
if (isTesting == true) {
Screen::set(std::make_unique<ScriptCreator>());
Gui::setScreen(std::make_unique<ScriptCreator>());
} else {
notImplemented();
}
@@ -467,17 +464,17 @@ void ScriptList::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
}
mode = 1;
} else {
Gui::DisplayWarnMsg(Lang::get("GET_SCRIPTS_FIRST"));
Msg::DisplayWarnMsg(Lang::get("GET_SCRIPTS_FIRST"));
}
} else if (touching(touch, subPos[1])) {
if (checkWifiStatus() == true) {
Screen::set(std::make_unique<ScriptBrowse>());
Gui::setScreen(std::make_unique<ScriptBrowse>());
} else {
notConnectedMsg();
}
} else if (touching(touch, subPos[2])) {
if (isTesting == true) {
Screen::set(std::make_unique<ScriptCreator>());
Gui::setScreen(std::make_unique<ScriptCreator>());
} else {
notImplemented();
}
+24 -27
View File
@@ -24,12 +24,9 @@
* reasonable ways as different from the original version.
*/
#include "credits.hpp"
#include "keyboard.hpp"
#include "screens/credits.hpp"
#include "screens/settings.hpp"
#include "utils/config.hpp"
#include "settings.hpp"
extern bool touching(touchPosition touch, Structs::ButtonPos button);
@@ -53,20 +50,20 @@ void Settings::Draw(void) const {
void Settings::DrawSubMenu(void) const {
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400);
} else {
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, "Universal-Updater", 400);
}
Gui::DrawBottom();
Gui::DrawArrow(0, 218, 0, 1);
Gui::DrawArrow(318, 240, 180.0, 1);
GFX::DrawBottom();
GFX::DrawArrow(0, 218, 0, 1);
GFX::DrawArrow(318, 240, 180.0, 1);
for (int i = 0; i < 3; i++) {
Gui::Draw_Rect(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, Config::UnselectedColor);
if (Selection == i) {
Gui::drawAnimatedSelector(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, .060, TRANSPARENT, Config::SelectedColor);
}
}
@@ -76,19 +73,19 @@ void Settings::DrawSubMenu(void) const {
}
void Settings::DrawLanguageSelection(void) const {
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("SELECT_LANG"), 400);
} else {
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, Lang::get("SELECT_LANG"), 400);
}
Gui::DrawBottom();
Gui::DrawArrow(0, 218, 0, 1);
GFX::DrawBottom();
GFX::DrawArrow(0, 218, 0, 1);
for (int language = 0; language < 10; language++) {
Gui::Draw_Rect(langBlocks[language].x, langBlocks[language].y, langBlocks[language].w, langBlocks[language].h, Config::UnselectedColor);
if (Config::lang == language) {
Gui::drawAnimatedSelector(langBlocks[language].x, langBlocks[language].y, langBlocks[language].w, langBlocks[language].h, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(langBlocks[language].x, langBlocks[language].y, langBlocks[language].w, langBlocks[language].h, .060, TRANSPARENT, Config::SelectedColor);
}
}
@@ -106,7 +103,7 @@ void Settings::DrawLanguageSelection(void) const {
}
void Settings::DrawColorChanging(void) const {
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400);
} else {
@@ -128,15 +125,15 @@ void Settings::DrawColorChanging(void) const {
Gui::DrawBottom();
Gui::DrawArrow(0, 218, 0, 1);
GFX::DrawBottom();
GFX::DrawArrow(0, 218, 0, 1);
Gui::DrawArrow(0, 0, 0, 1);
Gui::DrawArrow(318, 22, 180.0, 1);
GFX::DrawArrow(0, 0, 0, 1);
GFX::DrawArrow(318, 22, 180.0, 1);
for (int i = 0; i < 7; i++) {
if (colorMode == i) {
Gui::drawAnimatedSelector(54 + i * 25, 2, 16, 16, .060, C2D_Color32(140, 140, 140, 255));
Gui::drawAnimatedSelector(54 + i * 25, 2, 16, 16, .060, TRANSPARENT, C2D_Color32(140, 140, 140, 255));
}
}
@@ -187,20 +184,20 @@ void Settings::DrawColorChanging(void) const {
}
void Settings::DrawMiscSettings(void) const {
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400);
} else {
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, "Universal-Updater", 400);
}
Gui::DrawBottom();
Gui::DrawArrow(0, 218, 0, 1);
GFX::DrawBottom();
GFX::DrawArrow(0, 218, 0, 1);
for (int i = 0; i < 2; i++) {
Gui::Draw_Rect(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, Config::UnselectedColor);
if (Selection == i) {
Gui::drawAnimatedSelector(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, .060, TRANSPARENT, Config::SelectedColor);
}
}
@@ -258,7 +255,7 @@ void Settings::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
}
if (hDown & KEY_A) {
if (Selection + 1 == 3) Screen::set(std::make_unique<Credits>());
if (Selection + 1 == 3) Gui::setScreen(std::make_unique<Credits>());
else mode = Selection+1;
}
@@ -268,12 +265,12 @@ void Settings::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
} else if (touching(touch, mainButtons[1])) {
mode = 2;
} else if (touching(touch, mainButtons[2])) {
Screen::set(std::make_unique<Credits>());
Gui::setScreen(std::make_unique<Credits>());
}
}
if ((hDown & KEY_B) || (hDown & KEY_TOUCH && touching(touch, arrowPos[2]))) {
Screen::back();
Gui::screenBack();
return;
}
+51 -55
View File
@@ -24,17 +24,13 @@
* reasonable ways as different from the original version.
*/
#include "download.hpp"
#include "fileBrowse.hpp"
#include "formatting.hpp"
#include "json.hpp"
#include "keyboard.hpp"
#include "download/download.hpp"
#include "screens/unistore.hpp"
#include "utils/config.hpp"
#include "utils/fileBrowse.h"
#include "utils/formatting.hpp"
#include "utils/json.hpp"
#include "utils/scriptHelper.hpp"
#include "scriptHelper.hpp"
#include "unistore.hpp"
#include <algorithm>
#include <regex>
@@ -186,21 +182,21 @@ void loadStoreColors(nlohmann::json &json) {
}
void UniStore::DrawSubMenu(void) const {
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("UNISTORE_SUBMENU"), 400);
} else {
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, Lang::get("UNISTORE_SUBMENU"), 400);
}
Gui::sprite(sprites_uniStore_HD_idx, 140, 50, 0.2, 0.2);
Gui::DrawBottom();
Gui::DrawArrow(0, 218, 0, 1);
GFX::DrawSprite(sprites_uniStore_HD_idx, 140, 50, 0.2, 0.2);
GFX::DrawBottom();
GFX::DrawArrow(0, 218, 0, 1);
for (int i = 0; i < 3; i++) {
Gui::Draw_Rect(subPos[i].x, subPos[i].y, subPos[i].w, subPos[i].h, Config::UnselectedColor);
if (subSelection == i) {
Gui::drawAnimatedSelector(subPos[i].x, subPos[i].y, subPos[i].w, subPos[i].h, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(subPos[i].x, subPos[i].y, subPos[i].w, subPos[i].h, .060, TRANSPARENT, Config::SelectedColor);
}
}
@@ -215,7 +211,7 @@ void UniStore::DrawStoreList(void) const {
std::string line1;
std::string line2;
std::string storeAmount = std::to_string(selection +1) + " / " + std::to_string(storeInfo.size());
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, storeInfo[selection].title, 400);
Gui::DrawString(397-Gui::GetStringWidth(0.6f, storeAmount), 239-Gui::GetStringHeight(0.6f, storeAmount), 0.6f, Config::TxtColor, storeAmount);
@@ -227,13 +223,13 @@ void UniStore::DrawStoreList(void) const {
Gui::DrawStringCentered(0, 120-((descLines.size()*20)/2)+i*20, 0.6f, Config::TxtColor, descLines[i], 400);
}
Gui::DrawBottom();
Gui::DrawArrow(295, -1);
Gui::DrawArrow(315, 240, 180.0);
Gui::DrawArrow(0, 218, 0, 1);
Gui::spriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y);
Gui::spriteBlend(sprites_search_idx, arrowPos[4].x, arrowPos[4].y);
Gui::spriteBlend(sprites_update_idx, arrowPos[5].x, arrowPos[5].y);
GFX::DrawBottom();
GFX::DrawArrow(295, -1);
GFX::DrawArrow(315, 240, 180.0);
GFX::DrawArrow(0, 218, 0, 1);
GFX::DrawSpriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y);
GFX::DrawSpriteBlend(sprites_search_idx, arrowPos[4].x, arrowPos[4].y);
GFX::DrawSpriteBlend(sprites_update_idx, arrowPos[5].x, arrowPos[5].y);
if (Config::viewMode == 0) {
for(int i=0;i<ENTRIES_PER_SCREEN && i<(int)storeInfo.size();i++) {
@@ -241,7 +237,7 @@ void UniStore::DrawStoreList(void) const {
line1 = storeInfo[screenPos + i].title;
line2 = storeInfo[screenPos + i].author;
if(screenPos + i == selection) {
Gui::drawAnimatedSelector(0, 40+(i*57), 320, 45, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(0, 40+(i*57), 320, 45, .060, TRANSPARENT, Config::SelectedColor);
}
Gui::DrawStringCentered(0, 38+(i*57), 0.7f, Config::TxtColor, line1, 320);
Gui::DrawStringCentered(0, 62+(i*57), 0.7f, Config::TxtColor, line2, 320);
@@ -251,7 +247,7 @@ void UniStore::DrawStoreList(void) const {
Gui::Draw_Rect(0, (i+1)*27, 320, 25, Config::UnselectedColor);
line1 = storeInfo[screenPosList + i].title;
if(screenPosList + i == selection) {
Gui::drawAnimatedSelector(0, (i+1)*27, 320, 25, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(0, (i+1)*27, 320, 25, .060, TRANSPARENT, Config::SelectedColor);
}
Gui::DrawStringCentered(0, ((i+1)*27)+1, 0.7f, Config::TxtColor, line1, 320);
}
@@ -261,7 +257,7 @@ void UniStore::DrawStoreList(void) const {
void UniStore::DrawStore(void) const {
std::string entryAmount = std::to_string(selectedOptionAppStore+1) + " / " + std::to_string((int)appStoreJson.at("storeContent").size());
std::string info;
Gui::DrawTop();
GFX::DrawTop();
// Top Background.
if (appStoreJson.at("storeInfo").contains("iconIndexTop") && sheetHasLoaded == true) {
drawNormal(appStoreJson["storeInfo"]["iconIndexTop"], 0, 0);
@@ -302,16 +298,16 @@ void UniStore::DrawStore(void) const {
}
}
Gui::DrawBottom();
GFX::DrawBottom();
// Bottom Background.
if (appStoreJson.at("storeInfo").contains("iconIndexBottom") && sheetHasLoaded == true) {
drawNormal(appStoreJson["storeInfo"]["iconIndexBottom"], 0, 0);
}
Gui::DrawArrow(295, -1);
Gui::DrawArrow(315, 240, 180.0);
Gui::DrawArrow(0, 218, 0, 1);
Gui::spriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y);
GFX::DrawArrow(295, -1);
GFX::DrawArrow(315, 240, 180.0);
GFX::DrawArrow(0, 218, 0, 1);
GFX::DrawSpriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y);
if (Config::viewMode == 0) {
for(int i=0;i<ENTRIES_PER_SCREEN && i<(int)appStoreJson.at("storeContent").size();i++) {
@@ -320,7 +316,7 @@ void UniStore::DrawStore(void) const {
if (appStoreJson.at("storeInfo").contains("buttonLarge") && sheetHasLoaded == true) {
drawNormal(appStoreJson["storeInfo"]["buttonLarge"], 0, 40+(i*57));
} else {
Gui::drawAnimatedSelector(0, 40+(i*57), 320, 45, .060, selected);
Gui::drawAnimatedSelector(0, 40+(i*57), 320, 45, .060, TRANSPARENT, selected);
}
} else {
if (appStoreJson.at("storeInfo").contains("buttonLarge") && sheetHasLoaded == true) {
@@ -338,7 +334,7 @@ void UniStore::DrawStore(void) const {
if (appStoreJson.at("storeInfo").contains("buttonSmall") && sheetHasLoaded == true) {
drawNormal(appStoreJson["storeInfo"]["buttonSmall"], 0, (i+1)*27);
} else {
Gui::drawAnimatedSelector(0, (i+1)*27, 320, 25, .060, selected);
Gui::drawAnimatedSelector(0, (i+1)*27, 320, 25, .060, TRANSPARENT, selected);
}
} else {
if (appStoreJson.at("storeInfo").contains("buttonSmall") && sheetHasLoaded == true) {
@@ -370,7 +366,7 @@ void UniStore::Draw(void) const {
void UniStore::updateStore(int selectedStore) {
if (checkWifiStatus()) {
if (Gui::promptMsg(Lang::get("WOULD_YOU_LIKE_UPDATE"))) {
if (Msg::promptMsg(Lang::get("WOULD_YOU_LIKE_UPDATE"))) {
if(storeInfo[selectedStore].url != "" && storeInfo[selectedStore].url != "MISSING: storeInfo.url" &&
storeInfo[selectedStore].file != "" && storeInfo[selectedStore].file != "MISSING: storeInfo.file") {
ScriptHelper::downloadFile(storeInfo[selectedStore].url, storeInfo[selectedStore].file, Lang::get("UPDATING"));
@@ -397,7 +393,7 @@ void UniStore::updateStore(int selectedStore) {
void UniStore::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
if ((hDown & KEY_B) || (hDown & KEY_TOUCH && touching(touch, arrowPos[2]))) {
Screen::back();
Gui::screenBack();
return;
}
@@ -423,7 +419,7 @@ void UniStore::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
}
mode = 1;
} else {
Gui::DisplayWarnMsg(Lang::get("GET_STORES_FIRST"));
Msg::DisplayWarnMsg(Lang::get("GET_STORES_FIRST"));
}
break;
case 1:
@@ -456,7 +452,7 @@ void UniStore::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
}
mode = 1;
} else {
Gui::DisplayWarnMsg(Lang::get("GET_STORES_FIRST"));
Msg::DisplayWarnMsg(Lang::get("GET_STORES_FIRST"));
}
} else if (touching(touch, subPos[1])) {
if (checkWifiStatus() == true) {
@@ -559,7 +555,7 @@ void UniStore::StoreSelectionLogic(u32 hDown, u32 hHeld, touchPosition touch) {
if (ScriptHelper::checkIfValid(dirContents[selection].name, 1) == true) {
updateStore(selection);
currentStoreFile = dirContents[selection].name;
DisplayMsg(Lang::get("PREPARE_STORE"));
Msg::DisplayMsg(Lang::get("PREPARE_STORE"));
if (storeInfo[selection].storeSheet != "" || storeInfo[selection].storeSheet != "MISSING: storeInfo.sheet") {
if(access(storeInfo[selection].storeSheet.c_str(), F_OK) != -1 ) {
loadStoreSheet(selection);
@@ -599,7 +595,7 @@ void UniStore::StoreSelectionLogic(u32 hDown, u32 hHeld, touchPosition touch) {
}
if (hDown & KEY_SELECT) {
if (Gui::promptMsg(Lang::get("DELETE_STORE"))) {
if (Msg::promptMsg(Lang::get("DELETE_STORE"))) {
deleteStore(selection);
}
}
@@ -611,7 +607,7 @@ void UniStore::StoreSelectionLogic(u32 hDown, u32 hHeld, touchPosition touch) {
if (ScriptHelper::checkIfValid(dirContents[screenPos + i].name, 1) == true) {
updateStore(screenPos + i);
currentStoreFile = dirContents[screenPos + i].name;
DisplayMsg(Lang::get("PREPARE_STORE"));
Msg::DisplayMsg(Lang::get("PREPARE_STORE"));
if (storeInfo[screenPos + i].storeSheet != "" || storeInfo[screenPos + i].storeSheet != "MISSING: storeInfo.sheet") {
if(access(storeInfo[screenPos + i].storeSheet.c_str(), F_OK) != -1 ) {
loadStoreSheet(screenPos + i);
@@ -633,7 +629,7 @@ void UniStore::StoreSelectionLogic(u32 hDown, u32 hHeld, touchPosition touch) {
if (ScriptHelper::checkIfValid(dirContents[screenPosList + i].name, 1) == true) {
updateStore(screenPosList + i);
currentStoreFile = dirContents[screenPosList + i].name;
DisplayMsg(Lang::get("PREPARE_STORE"));
Msg::DisplayMsg(Lang::get("PREPARE_STORE"));
if (storeInfo[screenPosList + i].storeSheet != "" || storeInfo[screenPosList + i].storeSheet != "MISSING: storeInfo.sheet") {
if(access(storeInfo[screenPosList + i].storeSheet.c_str(), F_OK) != -1 ) {
loadStoreSheet(screenPosList + i);
@@ -835,7 +831,7 @@ void UniStore::execute() {
else missing = true;
promptmsg = Lang::get("DELETE_PROMPT") + "\n" + directory;
if(!missing) {
if (Gui::promptMsg(promptmsg)) {
if (Msg::promptMsg(promptmsg)) {
removeDirRecursive(directory.c_str());
}
}
@@ -867,21 +863,21 @@ void UniStore::execute() {
}
void UniStore::DrawSearch(void) const {
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("UNISTORE_SEARCH"), 400);
} else {
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, Lang::get("UNISTORE_SEARCH"), 400);
}
Gui::sprite(sprites_uniStore_HD_idx, 140, 50, 0.2, 0.2);
Gui::DrawBottom();
Gui::DrawArrow(0, 218, 0, 1);
GFX::DrawSprite(sprites_uniStore_HD_idx, 140, 50, 0.2, 0.2);
GFX::DrawBottom();
GFX::DrawArrow(0, 218, 0, 1);
for (int i = 0; i < 3; i++) {
Gui::Draw_Rect(URLBtn[i].x, URLBtn[i].y, URLBtn[i].w, URLBtn[i].h, Config::UnselectedColor);
if (searchSelection == i) {
Gui::drawAnimatedSelector(URLBtn[i].x, URLBtn[i].y, URLBtn[i].w, URLBtn[i].h, .060, Config::SelectedColor);
Gui::drawAnimatedSelector(URLBtn[i].x, URLBtn[i].y, URLBtn[i].w, URLBtn[i].h, .060, TRANSPARENT, Config::SelectedColor);
}
}
@@ -930,16 +926,16 @@ void UniStore::SearchLogic(u32 hDown, u32 hHeld, touchPosition touch) {
}
void UniStore::DrawGitHubScreen(void) const {
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("GITHUB"), 400);
} else {
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, Lang::get("GITHUB"), 400);
}
Gui::sprite(sprites_uniStore_HD_idx, 140, 50, 0.2, 0.2);
Gui::DrawBottom();
Gui::DrawArrow(0, 218, 0, 1);
GFX::DrawSprite(sprites_uniStore_HD_idx, 140, 50, 0.2, 0.2);
GFX::DrawBottom();
GFX::DrawArrow(0, 218, 0, 1);
Gui::DrawStringCentered(0, 28, 0.7f, Config::TxtColor, Lang::get("OWNER_AND_REPO"), 300);
Gui::DrawStringCentered(0, 108, 0.7f, Config::TxtColor, Lang::get("FILENAME"), 300);
@@ -984,16 +980,16 @@ void UniStore::GitHubLogic(u32 hDown, u32 hHeld, touchPosition touch) {
}
void UniStore::DrawFullURLScreen(void) const {
Gui::DrawTop();
GFX::DrawTop();
if (Config::UseBars == true) {
Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("FULL_URL"), 400);
} else {
Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, Lang::get("FULL_URL"), 400);
}
Gui::sprite(sprites_uniStore_HD_idx, 140, 50, 0.2, 0.2);
Gui::DrawBottom();
Gui::DrawArrow(0, 218, 0, 1);
GFX::DrawSprite(sprites_uniStore_HD_idx, 140, 50, 0.2, 0.2);
GFX::DrawBottom();
GFX::DrawArrow(0, 218, 0, 1);
Gui::DrawStringCentered(0, 28, 0.7f, Config::TxtColor, Lang::get("FULL_URL"), 320);
Gui::DrawStringCentered(0, 108, 0.7f, Config::TxtColor, Lang::get("FILENAME"), 320);