Implement Universal-Store [UniStore] 3DS side. (#13)
* WIP App store. ;P * Make the FileBrowse look like Scripts Screen. * Add *all* Script Functions for the App Store. * WIP; Store Selection & Store Screen. To-Do: Big cleanup and remove of duplicate stuff. * Some UniStore work. * :bigBruh:. * Add Spritesheet with Icon support. * Add a Store Prepare message, just in case it takes longer. * ~~Not really Camera stuff, just UniStore work.~~ (#12) * We don't want Nightly builds here. * Add UniStore Icon. * New banner by https://github.com/TotallyNotGuy * Add Buttons for a prompt & update icon. * Update README.md to be more descriptive and stuff * Update README.md * Add updating the spritesheet too. * Only update stores, if needed things exist! * Make Storepath changeable. * Change App Description. * Display `Title` as well. * You can now download .unistore files by entering a URL! Co-authored-by: FlameKat53 <flame9804@yahoo.com> * This should fix all warnings. Also add posX and posY for the Icons in UniStore. * Last changes for UniStore. Co-authored-by: FlameKat53 <flame9804@yahoo.com>
This commit is contained in:
parent
b6d6e6357a
commit
d28194d28c
29 changed files with 1064 additions and 546 deletions
|
|
@ -37,8 +37,6 @@
|
|||
#include <unistd.h>
|
||||
|
||||
extern bool touching(touchPosition touch, Structs::ButtonPos button);
|
||||
#define ENTRIES_PER_SCREEN 3
|
||||
#define ENTRIES_PER_LIST 7
|
||||
|
||||
bool isScriptSelected = false;
|
||||
|
||||
|
|
@ -384,32 +382,36 @@ void ScriptList::DrawSingleObject(void) const {
|
|||
void ScriptList::ListSelection(u32 hDown, u32 hHeld, touchPosition touch) {
|
||||
if (keyRepeatDelay) keyRepeatDelay--;
|
||||
|
||||
if (hDown & KEY_B) {
|
||||
if ((hDown & KEY_B) || (hDown & KEY_TOUCH && touching(touch, arrowPos[2]))) {
|
||||
fileInfo.clear();
|
||||
Screen::back();
|
||||
return;
|
||||
}
|
||||
|
||||
if (hDown & KEY_TOUCH && touching(touch, arrowPos[0])) {
|
||||
if (selection > 0) {
|
||||
selection--;
|
||||
} else {
|
||||
selection = (int)fileInfo.size()-1;
|
||||
}
|
||||
}
|
||||
|
||||
if (hDown & KEY_TOUCH && touching(touch, arrowPos[1])) {
|
||||
if ((hHeld & KEY_DOWN && !keyRepeatDelay) || (hDown & KEY_TOUCH && touching(touch, arrowPos[1]))) {
|
||||
if (selection < (int)fileInfo.size()-1) {
|
||||
selection++;
|
||||
} else {
|
||||
selection = 0;
|
||||
}
|
||||
if (fastMode == true) {
|
||||
keyRepeatDelay = 3;
|
||||
} else if (fastMode == false){
|
||||
keyRepeatDelay = 6;
|
||||
}
|
||||
}
|
||||
|
||||
if (hDown & KEY_TOUCH && touching(touch, arrowPos[2])) {
|
||||
fileInfo.clear();
|
||||
Screen::back();
|
||||
return;
|
||||
if ((hHeld & KEY_UP && !keyRepeatDelay) || (hDown & KEY_TOUCH && touching(touch, arrowPos[0]))) {
|
||||
if (selection > 0) {
|
||||
selection--;
|
||||
} else {
|
||||
selection = (int)fileInfo.size()-1;
|
||||
}
|
||||
if (fastMode == true) {
|
||||
keyRepeatDelay = 3;
|
||||
} else if (fastMode == false){
|
||||
keyRepeatDelay = 6;
|
||||
}
|
||||
}
|
||||
|
||||
if (hDown & KEY_TOUCH) {
|
||||
|
|
@ -457,31 +459,6 @@ void ScriptList::ListSelection(u32 hDown, u32 hHeld, touchPosition touch) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hHeld & KEY_DOWN && !keyRepeatDelay) {
|
||||
if (selection < (int)fileInfo.size()-1) {
|
||||
selection++;
|
||||
} else {
|
||||
selection = 0;
|
||||
}
|
||||
if (fastMode == true) {
|
||||
keyRepeatDelay = 3;
|
||||
} else if (fastMode == false){
|
||||
keyRepeatDelay = 6;
|
||||
}
|
||||
}
|
||||
if (hHeld & KEY_UP && !keyRepeatDelay) {
|
||||
if (selection > 0) {
|
||||
selection--;
|
||||
} else {
|
||||
selection = (int)fileInfo.size()-1;
|
||||
}
|
||||
if (fastMode == true) {
|
||||
keyRepeatDelay = 3;
|
||||
} else if (fastMode == false){
|
||||
keyRepeatDelay = 6;
|
||||
}
|
||||
}
|
||||
|
||||
if (hDown & KEY_A) {
|
||||
if (dirContents[selection].isDirectory) {
|
||||
|
|
@ -527,27 +504,38 @@ void ScriptList::ListSelection(u32 hDown, u32 hHeld, touchPosition touch) {
|
|||
|
||||
void ScriptList::SelectFunction(u32 hDown, u32 hHeld, touchPosition touch) {
|
||||
if (keyRepeatDelay) keyRepeatDelay--;
|
||||
if (hDown & KEY_TOUCH && touching(touch, arrowPos[0])) {
|
||||
if (selection2 > 0) {
|
||||
selection2--;
|
||||
} else {
|
||||
selection2 = (int)fileInfo2.size()-1;
|
||||
}
|
||||
|
||||
if ((hDown & KEY_B) || (hDown & KEY_TOUCH && touching(touch, arrowPos[2]))) {
|
||||
selection2 = 0;
|
||||
fileInfo2.clear();
|
||||
isScriptSelected = false;
|
||||
mode = 0;
|
||||
}
|
||||
|
||||
if (hDown & KEY_TOUCH && touching(touch, arrowPos[1])) {
|
||||
if ((hHeld & KEY_DOWN && !keyRepeatDelay) || (hDown & KEY_TOUCH && touching(touch, arrowPos[1]))) {
|
||||
if (selection2 < (int)fileInfo2.size()-1) {
|
||||
selection2++;
|
||||
} else {
|
||||
selection2 = 0;
|
||||
}
|
||||
if (fastMode == true) {
|
||||
keyRepeatDelay = 3;
|
||||
} else if (fastMode == false){
|
||||
keyRepeatDelay = 6;
|
||||
}
|
||||
}
|
||||
|
||||
if (hDown & KEY_TOUCH && touching(touch, arrowPos[2])) {
|
||||
selection2 = 0;
|
||||
fileInfo2.clear();
|
||||
isScriptSelected = false;
|
||||
mode = 0;
|
||||
if ((hHeld & KEY_UP && !keyRepeatDelay) || (hDown & KEY_TOUCH && touching(touch, arrowPos[0]))) {
|
||||
if (selection2 > 0) {
|
||||
selection2--;
|
||||
} else {
|
||||
selection2 = (int)fileInfo2.size()-1;
|
||||
}
|
||||
if (fastMode == true) {
|
||||
keyRepeatDelay = 3;
|
||||
} else if (fastMode == false){
|
||||
keyRepeatDelay = 6;
|
||||
}
|
||||
}
|
||||
|
||||
if (hDown & KEY_TOUCH) {
|
||||
|
|
@ -572,32 +560,6 @@ void ScriptList::SelectFunction(u32 hDown, u32 hHeld, touchPosition touch) {
|
|||
}
|
||||
}
|
||||
|
||||
if (hHeld & KEY_DOWN && !keyRepeatDelay) {
|
||||
if (selection2 < (int)fileInfo2.size()-1) {
|
||||
selection2++;
|
||||
} else {
|
||||
selection2 = 0;
|
||||
}
|
||||
if (fastMode == true) {
|
||||
keyRepeatDelay = 3;
|
||||
} else if (fastMode == false){
|
||||
keyRepeatDelay = 6;
|
||||
}
|
||||
}
|
||||
|
||||
if (hHeld & KEY_UP && !keyRepeatDelay) {
|
||||
if (selection2 > 0) {
|
||||
selection2--;
|
||||
} else {
|
||||
selection2 = (int)fileInfo2.size()-1;
|
||||
}
|
||||
if (fastMode == true) {
|
||||
keyRepeatDelay = 3;
|
||||
} else if (fastMode == false){
|
||||
keyRepeatDelay = 6;
|
||||
}
|
||||
}
|
||||
|
||||
if (hDown & KEY_A) {
|
||||
if (fileInfo2.size() != 0) {
|
||||
choice = fileInfo2[selection2];
|
||||
|
|
@ -623,13 +585,6 @@ void ScriptList::SelectFunction(u32 hDown, u32 hHeld, touchPosition touch) {
|
|||
Config::save();
|
||||
}
|
||||
|
||||
if (hDown & KEY_B) {
|
||||
selection2 = 0;
|
||||
fileInfo2.clear();
|
||||
isScriptSelected = false;
|
||||
mode = 0;
|
||||
}
|
||||
|
||||
if (Config::viewMode == 0) {
|
||||
if(selection2 < screenPos2) {
|
||||
screenPos2 = selection2;
|
||||
|
|
@ -653,7 +608,7 @@ void ScriptList::Logic(u32 hDown, u32 hHeld, touchPosition touch) {
|
|||
SelectFunction(hDown, hHeld, touch);
|
||||
}
|
||||
|
||||
if (hDown & KEY_X || hDown & KEY_TOUCH && touching(touch, arrowPos[3])) {
|
||||
if ((hDown & KEY_X) || (hDown & KEY_TOUCH && touching(touch, arrowPos[3]))) {
|
||||
if (Config::viewMode == 0) {
|
||||
Config::viewMode = 1;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue