Exit UU with START, switch START actions to SELECT
This commit is contained in:
parent
b907cd6b31
commit
2b0352114e
8 changed files with 34 additions and 8 deletions
|
|
@ -195,9 +195,8 @@ Result Init::MainLoop() {
|
|||
C3D_FrameEnd(0);
|
||||
|
||||
if (!exiting) Gui::ScreenLogic(hDown, hHeld, touch, true, false);
|
||||
|
||||
if (exiting) {
|
||||
if (hDown & KEY_START) fullExit = true; // Make it optionally faster.
|
||||
else {
|
||||
if (hidKeysDown() & KEY_START) fullExit = true; // Make it optionally faster.
|
||||
|
||||
if (fadeAlpha < 255) {
|
||||
fadeAlpha += 4;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#define DOWNLOAD_ENTRIES 7
|
||||
extern std::string _3dsxPath;
|
||||
extern bool is3DSX;
|
||||
extern bool exiting, is3DSX, QueueRuns;
|
||||
extern bool touching(touchPosition touch, Structs::ButtonPos button);
|
||||
static const std::vector<Structs::ButtonPos> downloadBoxes = {
|
||||
{ 46, 32, 241, 22 },
|
||||
|
|
@ -175,7 +175,7 @@ void StoreUtils::DownloadHandle(const std::unique_ptr<StoreEntry> &entry, const
|
|||
smallDelay--;
|
||||
}
|
||||
|
||||
if ((hDown & (KEY_Y | KEY_START) || (hDown & KEY_TOUCH && touching(touch, downloadBoxes[6]))) && !entries.empty()) {
|
||||
if ((hDown & (KEY_Y | KEY_SELECT) || (hDown & KEY_TOUCH && touching(touch, downloadBoxes[6]))) && !entries.empty()) {
|
||||
if (is3DSX) { // Only allow if 3DSX.
|
||||
if (StoreUtils::entries.size() <= 0) return; // Smaller than 0 -> No No.
|
||||
|
||||
|
|
@ -248,6 +248,10 @@ void StoreUtils::DownloadHandle(const std::unique_ptr<StoreEntry> &entry, const
|
|||
|
||||
if (hDown & KEY_B) currentMenu = lastMode; // Go back to EntryInfo.
|
||||
|
||||
/* Quit UU. */
|
||||
if (hDown & KEY_START && !QueueRuns)
|
||||
exiting = true;
|
||||
|
||||
/* Scroll Handle. */
|
||||
if (StoreUtils::store->GetDownloadIndex() < StoreUtils::store->GetDownloadSIndex()) StoreUtils::store->SetDownloadSIndex(StoreUtils::store->GetDownloadIndex());
|
||||
else if (StoreUtils::store->GetDownloadIndex() > StoreUtils::store->GetDownloadSIndex() + DOWNLOAD_ENTRIES - 1) StoreUtils::store->SetDownloadSIndex(StoreUtils::store->GetDownloadIndex() - DOWNLOAD_ENTRIES + 1);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ static const Structs::ButtonPos btn = { 45, 215, 24, 24 };
|
|||
static const Structs::ButtonPos sshot = { 75, 215, 24, 24 };
|
||||
static const Structs::ButtonPos notes = { 105, 215, 24, 24 };
|
||||
extern bool checkWifiStatus();
|
||||
extern bool QueueRuns;
|
||||
extern bool exiting, QueueRuns;
|
||||
|
||||
/*
|
||||
Draw the Entry Info part.
|
||||
|
|
@ -78,7 +78,7 @@ void StoreUtils::DrawEntryInfo(const std::unique_ptr<StoreEntry> &entry) {
|
|||
*/
|
||||
void StoreUtils::EntryHandle(bool &showMark, bool &fetch, bool &sFetch, int &mode, const std::unique_ptr<StoreEntry> &entry) {
|
||||
if (entry) {
|
||||
if ((hDown & KEY_START) || (hDown & KEY_TOUCH && touching(touch, btn))) showMark = true;
|
||||
if ((hDown & KEY_SELECT) || (hDown & KEY_TOUCH && touching(touch, btn))) showMark = true;
|
||||
|
||||
if ((hDown & KEY_Y) || (hDown & KEY_TOUCH && touching(touch, sshot))) {
|
||||
if (!entry->GetScreenshots().empty()) {
|
||||
|
|
@ -100,4 +100,8 @@ void StoreUtils::EntryHandle(bool &showMark, bool &fetch, bool &sFetch, int &mod
|
|||
if (entry->GetReleaseNotes() != "") mode = 7;
|
||||
}
|
||||
}
|
||||
|
||||
/* Quit UU. */
|
||||
if (hDown & KEY_START && !QueueRuns)
|
||||
exiting = true;
|
||||
}
|
||||
|
|
@ -124,5 +124,5 @@ void StoreUtils::MarkHandle(std::unique_ptr<StoreEntry> &entry, bool &showMark)
|
|||
}
|
||||
|
||||
|
||||
if ((hidKeysDown() & KEY_B || hidKeysDown() & KEY_START) || (hidKeysDown() & KEY_TOUCH && touching(t, markBox[5]))) showMark = false; // Return back to screen.
|
||||
if ((hidKeysDown() & KEY_B || hidKeysDown() & KEY_SELECT) || (hidKeysDown() & KEY_TOUCH && touching(t, markBox[5]))) showMark = false; // Return back to screen.
|
||||
}
|
||||
|
|
@ -36,6 +36,7 @@ extern u32 extractSize, writeOffset;
|
|||
extern u32 installSize, installOffset;
|
||||
extern u32 copyOffset, copySize;
|
||||
extern int filesExtracted, extractFilesCount;
|
||||
extern bool exiting, QueueRuns;
|
||||
|
||||
extern curl_off_t downloadTotal;
|
||||
extern curl_off_t downloadNow;
|
||||
|
|
@ -331,4 +332,8 @@ void StoreUtils::QueueMenuHandle(int &queueIndex, int &storeMode) {
|
|||
}
|
||||
|
||||
if (hDown & KEY_B) storeMode = 0; // Go to EntryInfo.
|
||||
|
||||
/* Quit UU. */
|
||||
if (hDown & KEY_START && !QueueRuns)
|
||||
exiting = true;
|
||||
}
|
||||
|
|
@ -29,6 +29,7 @@
|
|||
#include "storeUtils.hpp"
|
||||
#include "structs.hpp"
|
||||
|
||||
extern bool exiting, QueueRuns;
|
||||
extern bool touching(touchPosition touch, Structs::ButtonPos button);
|
||||
static const std::vector<Structs::ButtonPos> SearchMenu = {
|
||||
{ 51, 41, 262, 30 }, // Search bar.
|
||||
|
|
@ -232,4 +233,8 @@ void StoreUtils::SearchHandle(std::vector<bool> &searchIncludes, std::string &se
|
|||
StoreUtils::SortEntries(ascending, sorttype);
|
||||
}
|
||||
}
|
||||
|
||||
/* Quit UU. */
|
||||
if (hDown & KEY_START && !QueueRuns)
|
||||
exiting = true;
|
||||
}
|
||||
|
|
@ -316,6 +316,10 @@ static void SettingsHandleMain(int &page, bool &dspSettings, int &storeMode, int
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Quit UU. */
|
||||
if (hDown & KEY_START && !QueueRuns)
|
||||
exiting = true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "storeUtils.hpp"
|
||||
#include "structs.hpp"
|
||||
|
||||
extern bool exiting, QueueRuns;
|
||||
extern bool touching(touchPosition touch, Structs::ButtonPos button);
|
||||
|
||||
static const std::vector<Structs::ButtonPos> buttons = {
|
||||
|
|
@ -158,4 +159,8 @@ void StoreUtils::SortHandle(bool &asc, SortType &st) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Quit UU. */
|
||||
if (hDown & KEY_START && !QueueRuns)
|
||||
exiting = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue