mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-05 00:38:52 +00:00
See desc for more.
- Add `skip` function. - Fix dirSelect. - Move LangSelect to settings. - Add bars, to keep the U-U style.
This commit is contained in:
@@ -44,31 +44,26 @@ static const std::vector<Structs::ButtonPos> mainButtons = {
|
||||
*/
|
||||
std::string Overlays::SelectDir(const std::string &oldDir, const std::string &msg, const std::unique_ptr<Store> &store) {
|
||||
std::string currentPath = oldDir;
|
||||
bool dirChanged = true;
|
||||
bool dirChanged = false;
|
||||
int selection = 0, sPos = 0;
|
||||
|
||||
std::vector<DirEntry> dirContents;
|
||||
dirContents.clear();
|
||||
|
||||
if (dirChanged) {
|
||||
dirChanged = false;
|
||||
/* Make sure. */
|
||||
if (access((oldDir + std::string("/")).c_str(), F_OK) == 0) {
|
||||
chdir((oldDir + std::string("/")).c_str());
|
||||
|
||||
dirContents.clear();
|
||||
} else {
|
||||
currentPath = "sdmc:/";
|
||||
chdir("sdmc:/");
|
||||
}
|
||||
|
||||
/* Make sure. */
|
||||
if (access(oldDir.c_str(), F_OK) == 0) {
|
||||
chdir(oldDir.c_str());
|
||||
std::vector<DirEntry> dirContentsTemp;
|
||||
getDirectoryContents(dirContentsTemp, {"/"});
|
||||
|
||||
} else {
|
||||
currentPath = "sdmc:/";
|
||||
chdir("sdmc:/");
|
||||
}
|
||||
|
||||
std::vector<DirEntry> dirContentsTemp;
|
||||
getDirectoryContents(dirContentsTemp, {"/"});
|
||||
|
||||
for(uint i = 0; i < dirContentsTemp.size(); i++) {
|
||||
dirContents.push_back(dirContentsTemp[i]);
|
||||
}
|
||||
for(uint i = 0; i < dirContentsTemp.size(); i++) {
|
||||
dirContents.push_back(dirContentsTemp[i]);
|
||||
}
|
||||
|
||||
while(1) {
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* Copyright (C) 2019-2020 Universal-Team
|
||||
*
|
||||
* 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 "fileBrowse.hpp"
|
||||
#include "keyboard.hpp"
|
||||
#include "overlay.hpp"
|
||||
#include "scriptUtils.hpp"
|
||||
#include "storeUtils.hpp"
|
||||
|
||||
extern bool checkWifiStatus();
|
||||
extern bool touching(touchPosition touch, Structs::ButtonPos button);
|
||||
static const std::vector<std::string> languages = { "Bruh", "Dansk", "Deutsch", "English", "Español", "Français", "Italiano", "Lietuvių", "Magyar", "Polski", "Português", "Português (Brasil)", "Русский", "日本語" };
|
||||
static const std::string langsTemp[] = { "br", "da", "de", "en", "es", "fr", "it", "lt", "hu", "pl", "pt", "pt-BR", "ru", "jp"};
|
||||
|
||||
static const std::vector<Structs::ButtonPos> mainButtons = {
|
||||
{ 10, 4, 300, 22 },
|
||||
{ 10, 34, 300, 22 },
|
||||
{ 10, 64, 300, 22 },
|
||||
{ 10, 94, 300, 22 },
|
||||
{ 10, 124, 300, 22 },
|
||||
{ 10, 154, 300, 22 },
|
||||
{ 10, 184, 300, 22 },
|
||||
{ 10, 214, 300, 22 }
|
||||
};
|
||||
|
||||
/*
|
||||
Select a Language.
|
||||
|
||||
Can be skipped with `B`.
|
||||
*/
|
||||
void Overlays::SelectLanguage(const std::unique_ptr<Store> &store) {
|
||||
bool doOut = false;
|
||||
int selection = 0, sPos = 0;
|
||||
|
||||
while(!doOut) {
|
||||
Gui::clearTextBufs();
|
||||
C3D_FrameBegin(C3D_FRAME_SYNCDRAW);
|
||||
C2D_TargetClear(Top, TRANSPARENT);
|
||||
C2D_TargetClear(Bottom, TRANSPARENT);
|
||||
|
||||
if (store && config->usebg() && store->customBG()) {
|
||||
Gui::ScreenDraw(Top);
|
||||
Gui::Draw_Rect(0, 0, 400, 25, BAR_COLOR);
|
||||
Gui::Draw_Rect(0, 25, 400, 1, BAR_OUTL_COLOR);
|
||||
C2D_DrawImageAt(store->GetStoreImg(), 0, 26, 0.5f, nullptr);
|
||||
|
||||
} else {
|
||||
GFX::DrawTop();
|
||||
}
|
||||
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, TEXT_COLOR, Lang::get("SELECT_LANG"));
|
||||
GFX::DrawBottom();
|
||||
|
||||
for(int i = 0; i < 8 && i < (int)languages.size(); i++) {
|
||||
if (sPos + i == selection) GFX::DrawBox(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, false);
|
||||
Gui::DrawStringCentered(0, mainButtons[i].y + 4, 0.45f, TEXT_COLOR, languages[sPos + i], 280);
|
||||
}
|
||||
C3D_FrameEnd(0);
|
||||
|
||||
hidScanInput();
|
||||
touchPosition touch;
|
||||
hidTouchRead(&touch);
|
||||
u32 hRepeat = hidKeysDownRepeat();
|
||||
|
||||
if (hRepeat & KEY_DOWN) {
|
||||
if (selection < (int)languages.size() - 1) selection++;
|
||||
else selection = 0;
|
||||
}
|
||||
|
||||
if (hRepeat & KEY_UP) {
|
||||
if (selection > 0) selection--;
|
||||
else selection = languages.size() - 1;
|
||||
}
|
||||
|
||||
if (hRepeat & KEY_RIGHT) {
|
||||
if (selection + 8 < (int)languages.size()-1) selection += 8;
|
||||
else selection = languages.size()-1;
|
||||
}
|
||||
|
||||
if (hRepeat & KEY_LEFT) {
|
||||
if (selection - 8 > 0) selection -= 8;
|
||||
else selection = 0;
|
||||
}
|
||||
|
||||
if (hidKeysDown() & KEY_A) {
|
||||
const std::string l = langsTemp[selection];
|
||||
config->language(l);
|
||||
Lang::load(config->language());
|
||||
doOut = true;
|
||||
}
|
||||
|
||||
if (hidKeysDown() & KEY_TOUCH) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (touching(touch, mainButtons[i])) {
|
||||
if (i + sPos < (int)languages.size()) {
|
||||
const std::string l = langsTemp[i + sPos];
|
||||
config->language(l);
|
||||
Lang::load(config->language());
|
||||
doOut = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (selection < sPos) sPos = selection;
|
||||
else if (selection > sPos + 8 - 1) sPos = selection - 8 + 1;
|
||||
|
||||
if (hidKeysDown() & KEY_B) doOut = true;
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,6 @@
|
||||
extern bool checkWifiStatus();
|
||||
extern bool touching(touchPosition touch, Structs::ButtonPos button);
|
||||
static const std::vector<Structs::ButtonPos> mainButtons = {
|
||||
{ 10, 4, 300, 22 },
|
||||
{ 10, 34, 300, 22 },
|
||||
{ 10, 64, 300, 22 },
|
||||
{ 10, 94, 300, 22 },
|
||||
@@ -46,11 +45,11 @@ static const std::vector<Structs::ButtonPos> mainButtons = {
|
||||
{ 10, 184, 300, 22 },
|
||||
|
||||
/* Add, Delete, Info.. */
|
||||
{ 70, 215, 16, 16 },
|
||||
{ 114, 215, 16, 16 },
|
||||
{ 158, 215, 16, 16 },
|
||||
{ 202, 215, 16, 16 },
|
||||
{ 246, 215, 16, 16 }
|
||||
{ 92, 215, 16, 16 },
|
||||
{ 136, 215, 16, 16 },
|
||||
{ 180, 215, 16, 16 },
|
||||
{ 224, 215, 16, 16 },
|
||||
{ 4, 0, 24, 24 } // Back.
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -152,54 +151,56 @@ static bool DownloadStore(bool Cam = true) {
|
||||
return doSheet;
|
||||
}
|
||||
|
||||
/*
|
||||
Re-Download SpriteSheets optional.
|
||||
static bool UpdateStore(const std::string &URL) {
|
||||
bool doSheet = false;
|
||||
std::string file = "";
|
||||
|
||||
const std::string &file: Const Reference to the UniStore filename.
|
||||
*/
|
||||
static bool DownloadSheet(const std::string &file) {
|
||||
FILE *temp = fopen((std::string(_STORE_PATH) + file).c_str(), "rt");
|
||||
nlohmann::json storeJson = nlohmann::json::parse(temp, nullptr, false);
|
||||
fclose(temp);
|
||||
if (URL != "") doSheet = DownloadUniStore(URL, -1, file, false);
|
||||
|
||||
if (storeJson["storeInfo"].contains("sheetURL") && storeJson["storeInfo"]["sheetURL"].is_array()) {
|
||||
if (storeJson["storeInfo"].contains("sheet") && storeJson["storeInfo"]["sheet"].is_array()) {
|
||||
const std::vector<std::string> locs = storeJson["storeInfo"]["sheetURL"].get<std::vector<std::string>>();
|
||||
const std::vector<std::string> sht = storeJson["storeInfo"]["sheet"].get<std::vector<std::string>>();
|
||||
if (doSheet) {
|
||||
FILE *temp = fopen(file.c_str(), "rt");
|
||||
nlohmann::json storeJson = nlohmann::json::parse(temp, nullptr, false);
|
||||
fclose(temp);
|
||||
|
||||
if (locs.size() == sht.size()) {
|
||||
for (int i = 0; i < (int)sht.size(); i++) {
|
||||
if (!(sht[i].find("/") != std::string::npos)) {
|
||||
char msg[150];
|
||||
snprintf(msg, sizeof(msg), Lang::get("DOWNLOADING_SPRITE_SHEET2").c_str(), i + 1, sht.size());
|
||||
Msg::DisplayMsg(msg);
|
||||
DownloadSpriteSheet(locs[i], sht[i]);
|
||||
if (doSheet) {
|
||||
if (storeJson["storeInfo"].contains("sheetURL") && storeJson["storeInfo"]["sheetURL"].is_array()) {
|
||||
if (storeJson["storeInfo"].contains("sheet") && storeJson["storeInfo"]["sheet"].is_array()) {
|
||||
const std::vector<std::string> locs = storeJson["storeInfo"]["sheetURL"].get<std::vector<std::string>>();
|
||||
const std::vector<std::string> sht = storeJson["storeInfo"]["sheet"].get<std::vector<std::string>>();
|
||||
|
||||
} else {
|
||||
Msg::waitMsg(Lang::get("SHEET_SLASH"));
|
||||
return false;
|
||||
if (locs.size() == sht.size()) {
|
||||
for (int i = 0; i < (int)sht.size(); i++) {
|
||||
if (!(sht[i].find("/") != std::string::npos)) {
|
||||
char msg[150];
|
||||
snprintf(msg, sizeof(msg), Lang::get("DOWNLOADING_SPRITE_SHEET2").c_str(), i + 1, sht.size());
|
||||
Msg::DisplayMsg(msg);
|
||||
DownloadSpriteSheet(locs[i], sht[i]);
|
||||
|
||||
} else {
|
||||
Msg::waitMsg(Lang::get("SHEET_SLASH"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if (storeJson["storeInfo"].contains("sheetURL") && storeJson["storeInfo"]["sheetURL"].is_string()) {
|
||||
if (storeJson["storeInfo"].contains("sheet") && storeJson["storeInfo"]["sheet"].is_string()) {
|
||||
const std::string fl = storeJson["storeInfo"]["sheetURL"];
|
||||
const std::string fl2 = storeJson["storeInfo"]["sheet"];
|
||||
} else if (storeJson["storeInfo"].contains("sheetURL") && storeJson["storeInfo"]["sheetURL"].is_string()) {
|
||||
if (storeJson["storeInfo"].contains("sheet") && storeJson["storeInfo"]["sheet"].is_string()) {
|
||||
const std::string fl = storeJson["storeInfo"]["sheetURL"];
|
||||
const std::string fl2 = storeJson["storeInfo"]["sheet"];
|
||||
|
||||
if (!(fl2.find("/") != std::string::npos)) {
|
||||
Msg::DisplayMsg(Lang::get("DOWNLOADING_SPRITE_SHEET"));
|
||||
DownloadSpriteSheet(fl, fl2);
|
||||
if (!(fl2.find("/") != std::string::npos)) {
|
||||
Msg::DisplayMsg(Lang::get("DOWNLOADING_SPRITE_SHEET"));
|
||||
DownloadSpriteSheet(fl, fl2);
|
||||
|
||||
} else {
|
||||
Msg::waitMsg(Lang::get("SHEET_SLASH"));
|
||||
return false;
|
||||
} else {
|
||||
Msg::waitMsg(Lang::get("SHEET_SLASH"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return doSheet;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -237,25 +238,24 @@ void Overlays::SelectStore(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
GFX::DrawTop();
|
||||
}
|
||||
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, TEXT_COLOR, Lang::get("SELECT_UNISTORE_2"), 390);
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, TEXT_COLOR, info[selection].Title, 390);
|
||||
|
||||
if (info.size() > 0) {
|
||||
if (info[selection].StoreSize != -1) {
|
||||
Gui::DrawStringCentered(0, 30, 0.6f, TEXT_COLOR, info[selection].Title, 380);
|
||||
Gui::DrawStringCentered(0, 60, 0.5f, TEXT_COLOR, info[selection].Author, 380);
|
||||
Gui::DrawStringCentered(0, 30, 0.6f, TEXT_COLOR, info[selection].Author, 380);
|
||||
|
||||
if (info[selection].Description != "") {
|
||||
/* "\n\n" breaks C2D_WordWrap, so check here. */
|
||||
if (!(info[selection].Description.find("\n\n") != std::string::npos)) {
|
||||
Gui::DrawStringCentered(0, 100, 0.5f, TEXT_COLOR, info[selection].Description, 380, 95, nullptr, C2D_WordWrap);
|
||||
Gui::DrawStringCentered(0, 70, 0.5f, TEXT_COLOR, info[selection].Description, 380, 130, nullptr, C2D_WordWrap);
|
||||
|
||||
} else {
|
||||
Gui::DrawStringCentered(0, 100, 0.5f, TEXT_COLOR, info[selection].Description, 380, 95);
|
||||
Gui::DrawStringCentered(0, 70, 0.5f, TEXT_COLOR, info[selection].Description, 380, 130);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Gui::DrawStringCentered(0, 30, 0.6f, TEXT_COLOR, Lang::get("INVALID_UNISTORE"), 380);
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, TEXT_COLOR, Lang::get("INVALID_UNISTORE"), 390);
|
||||
}
|
||||
|
||||
Gui::DrawString(10, 200, 0.4, TEXT_COLOR, "- " + Lang::get("ENTRIES") + ": " + std::to_string(info[selection].StoreSize), 150);
|
||||
@@ -264,7 +264,12 @@ void Overlays::SelectStore(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
|
||||
GFX::DrawBottom();
|
||||
|
||||
for(int i = 0; i < 7 && i < (int)info.size(); i++) {
|
||||
Gui::Draw_Rect(0, 0, 320, 25, ENTRY_BAR_COLOR);
|
||||
Gui::Draw_Rect(0, 25, 320, 1, ENTRY_BAR_OUTL_COLOR);
|
||||
GFX::DrawSprite(sprites_arrow_idx, mainButtons[10].x, mainButtons[10].y);
|
||||
Gui::DrawStringCentered(0, 2, 0.6, TEXT_COLOR, Lang::get("SELECT_UNISTORE_2"), 310);
|
||||
|
||||
for(int i = 0; i < 6 && i < (int)info.size(); i++) {
|
||||
if (sPos + i == selection) GFX::DrawBox(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, false);
|
||||
|
||||
Gui::DrawStringCentered(10 - 160 + (300 / 2), mainButtons[i].y + 4, 0.45f, TEXT_COLOR, info[sPos + i].FileName, 295);
|
||||
@@ -273,11 +278,10 @@ void Overlays::SelectStore(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
|
||||
if (info.size() <= 0) GFX::DrawBottom(); // Otherwise we'd draw on top.
|
||||
|
||||
GFX::DrawSprite(sprites_delete_idx, mainButtons[7].x, mainButtons[7].y);
|
||||
GFX::DrawSprite(sprites_update_idx, mainButtons[8].x, mainButtons[8].y);
|
||||
GFX::DrawSprite(sprites_sheet_idx, mainButtons[9].x, mainButtons[9].y);
|
||||
GFX::DrawSprite(sprites_add_idx, mainButtons[10].x, mainButtons[10].y);
|
||||
GFX::DrawSprite(sprites_qr_code_idx, mainButtons[11].x, mainButtons[11].y);
|
||||
GFX::DrawSprite(sprites_delete_idx, mainButtons[6].x, mainButtons[6].y);
|
||||
GFX::DrawSprite(sprites_update_idx, mainButtons[7].x, mainButtons[7].y);
|
||||
GFX::DrawSprite(sprites_add_idx, mainButtons[8].x, mainButtons[8].y);
|
||||
GFX::DrawSprite(sprites_qr_code_idx, mainButtons[9].x, mainButtons[9].y);
|
||||
C3D_FrameEnd(0);
|
||||
|
||||
hidScanInput();
|
||||
@@ -297,12 +301,12 @@ void Overlays::SelectStore(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
}
|
||||
|
||||
if (hRepeat & KEY_RIGHT) {
|
||||
if (selection + 7 < (int)info.size()-1) selection += 7;
|
||||
else selection = info.size()-1;
|
||||
if (selection + 6 < (int)info.size() - 1) selection += 6;
|
||||
else selection = info.size() - 1;
|
||||
}
|
||||
|
||||
if (hRepeat & KEY_LEFT) {
|
||||
if (selection - 7 > 0) selection -= 8;
|
||||
if (selection - 6 > 0) selection -= 6;
|
||||
else selection = 0;
|
||||
}
|
||||
|
||||
@@ -328,7 +332,7 @@ void Overlays::SelectStore(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
}
|
||||
|
||||
if (hidKeysDown() & KEY_TOUCH) {
|
||||
for (int i = 0; i < 7; i++) {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
if (touching(touch, mainButtons[i])) {
|
||||
if (i + sPos < (int)info.size() && info[i + sPos].File != "") { // Ensure to check for this.
|
||||
if (!(info[i + sPos].File.find("/") != std::string::npos)) {
|
||||
@@ -351,7 +355,7 @@ void Overlays::SelectStore(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
}
|
||||
|
||||
/* Delete UniStore. */
|
||||
if (hidKeysDown() & KEY_TOUCH && touching(touch, mainButtons[7])) {
|
||||
if ((hidKeysDown() & KEY_X) || (hidKeysDown() & KEY_TOUCH && touching(touch, mainButtons[6]))) {
|
||||
if (info[selection].FileName != "") {
|
||||
DeleteStore(info[selection].FileName);
|
||||
selection = 0;
|
||||
@@ -359,31 +363,24 @@ void Overlays::SelectStore(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
}
|
||||
}
|
||||
|
||||
/* Update checks. */
|
||||
if (hidKeysDown() & KEY_TOUCH && touching(touch, mainButtons[8])) {
|
||||
/* Download latest UniStore. */
|
||||
if ((hidKeysDown() & KEY_START) || (hidKeysDown() & KEY_TOUCH && touching(touch, mainButtons[7]))) {
|
||||
if (checkWifiStatus()) {
|
||||
if (info[selection].Revision > 0) {
|
||||
const bool result = IsUpdateAvailable(info[selection].URL, info[selection].Revision);
|
||||
Msg::waitMsg((result ? Lang::get("UPDATE_AVAILABLE") : Lang::get("UPDATE_NOT_AVAILABLE")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* SpriteSheet Download. */
|
||||
if (hidKeysDown() & KEY_TOUCH && touching(touch, mainButtons[9])) {
|
||||
if (checkWifiStatus()) {
|
||||
if (info[selection].FileName != "") {
|
||||
DownloadSheet(info[selection].FileName);
|
||||
if (info[selection].URL != "") {
|
||||
if (UpdateStore(info[selection].URL)) {
|
||||
selection = 0;
|
||||
info = GetUniStoreInfo(_STORE_PATH);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (selection < sPos) sPos = selection;
|
||||
else if (selection > sPos + 7 - 1) sPos = selection - 7 + 1;
|
||||
else if (selection > sPos + 6 - 1) sPos = selection - 6 + 1;
|
||||
}
|
||||
|
||||
/* UniStore URL Download. */
|
||||
if ((hidKeysDown() & KEY_Y) || (hidKeysDown() & KEY_TOUCH && touching(touch, mainButtons[10]))) {
|
||||
if ((hidKeysDown() & KEY_Y) || (hidKeysDown() & KEY_TOUCH && touching(touch, mainButtons[8]))) {
|
||||
if (checkWifiStatus()) {
|
||||
if (DownloadStore(false)) {
|
||||
selection = 0;
|
||||
@@ -393,7 +390,7 @@ void Overlays::SelectStore(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
}
|
||||
|
||||
/* UniStore QR Code Download. */
|
||||
if (hidKeysDown() & KEY_TOUCH && touching(touch, mainButtons[11])) {
|
||||
if ((hidKeysDown() & KEY_SELECT) || (hidKeysDown() & KEY_TOUCH && touching(touch, mainButtons[9]))) {
|
||||
if (checkWifiStatus()) {
|
||||
if (DownloadStore()) {
|
||||
selection = 0;
|
||||
@@ -402,6 +399,9 @@ void Overlays::SelectStore(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
}
|
||||
}
|
||||
|
||||
if (hidKeysDown() & KEY_B) doOut = true;
|
||||
/* Go out of the menu. */
|
||||
if ((hidKeysDown() & KEY_B) || (hidKeysDown() & KEY_TOUCH && touching(touch, mainButtons[10]))) {
|
||||
doOut = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user