mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
WIP: Add Glossary and some cleanup.
This commit is contained in:
@@ -39,14 +39,26 @@ public:
|
||||
void Draw(void) const override;
|
||||
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
|
||||
ScriptBrowse();
|
||||
|
||||
private:
|
||||
std::vector<DirEntry> dirContents;
|
||||
// Selection.
|
||||
mutable int screenPos = 0;
|
||||
mutable int screenPosList = 0;
|
||||
mutable int selection = 0;
|
||||
mutable int Selection = 0;
|
||||
int mode = 0;
|
||||
|
||||
// Draws.
|
||||
void DrawBrowse(void) const;
|
||||
void DrawGlossary(void) const;
|
||||
|
||||
nlohmann::json infoJson;
|
||||
int maxScripts;
|
||||
|
||||
// Browse stuff.
|
||||
int keyRepeatDelay = 0;
|
||||
int fastMode = false;
|
||||
std::vector<DirEntry> dirContents;
|
||||
|
||||
// Button | Icon struct.
|
||||
std::vector<Structs::ButtonPos> arrowPos = {
|
||||
{295, 0, 25, 25}, // Arrow Up.
|
||||
{295, 215, 25, 25}, // Arrow Down.
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "common.hpp"
|
||||
#include "fileBrowse.hpp"
|
||||
#include "scriptHelper.hpp"
|
||||
#include "structs.hpp"
|
||||
|
||||
#include <vector>
|
||||
@@ -38,32 +39,55 @@ class ScriptList : public Screen
|
||||
public:
|
||||
void Draw(void) const override;
|
||||
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
|
||||
ScriptList();
|
||||
ScriptList(); // In case of "Autoboot", have a Constructor which handles stuff.
|
||||
private:
|
||||
// Screen Mode.
|
||||
int mode = 0;
|
||||
int lastMode = 1;
|
||||
|
||||
// Helper functions.
|
||||
void deleteScript(int selectedScript);
|
||||
void refreshList();
|
||||
nlohmann::json openScriptFile();
|
||||
void checkForValidate(void);
|
||||
void loadDesc(void);
|
||||
void runFunctions(nlohmann::json &json);
|
||||
|
||||
// Draw Functions.
|
||||
void DrawSubMenu(void) const;
|
||||
void DrawList(void) const;
|
||||
void DrawSingleObject(void) const;
|
||||
void DrawGlossary(void) const;
|
||||
|
||||
// Logic Functions.
|
||||
void SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch);
|
||||
void ListSelection(u32 hDown, u32 hHeld, touchPosition touch);
|
||||
void SelectFunction(u32 hDown, u32 hHeld, touchPosition touch);
|
||||
|
||||
int mode = 0;
|
||||
int SubSelection = 0;
|
||||
std::vector<DirEntry> dirContents;
|
||||
// This is for the Script Creator, so no one can access it for now, until it is stable or so.
|
||||
bool isTesting = false;
|
||||
|
||||
// Other includes which get destructed automatically.
|
||||
std::string choice;
|
||||
std::string currentFile;
|
||||
std::string selectedTitle;
|
||||
std::string Desc = "";
|
||||
nlohmann::json jsonFile;
|
||||
std::vector<ScriptInfo> fileInfo;
|
||||
std::vector<std::string> fileInfo2;
|
||||
std::vector<std::string> lines;
|
||||
|
||||
mutable int screenPos = 0;
|
||||
mutable int screenPosList = 0;
|
||||
mutable int selection = 0;
|
||||
mutable int screenPos2 = 0;
|
||||
mutable int screenPosList2 = 0;
|
||||
mutable int selection2 = 0;
|
||||
mutable int Selection = 0;
|
||||
|
||||
// Browse stuff.
|
||||
int keyRepeatDelay = 0;
|
||||
std::vector<DirEntry> dirContents;
|
||||
int fastMode = false;
|
||||
|
||||
|
||||
// Button | Icon structs.
|
||||
std::vector<Structs::ButtonPos> arrowPos = {
|
||||
{295, 0, 25, 25}, // Arrow Up.
|
||||
{295, 215, 25, 25}, // Arrow Down.
|
||||
@@ -71,7 +95,6 @@ private:
|
||||
{5, 0, 25, 25}, // viewMode Change
|
||||
{45, 0, 25, 25}, // Search.
|
||||
};
|
||||
|
||||
std::vector<Structs::ButtonPos> subPos = {
|
||||
{10, 70, 140, 40}, // Script list.
|
||||
{170, 70, 140, 40}, // Get Scripts.
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "common.hpp"
|
||||
#include "fileBrowse.hpp"
|
||||
#include "scriptHelper.hpp"
|
||||
#include "structs.hpp"
|
||||
|
||||
#include <vector>
|
||||
@@ -41,13 +42,17 @@ public:
|
||||
UniStore();
|
||||
private:
|
||||
void refreshList();
|
||||
|
||||
nlohmann::json openStoreFile();
|
||||
void loadStoreDesc(void);
|
||||
void loadStoreSheet(int pos);
|
||||
|
||||
void DrawSubMenu(void) const;
|
||||
void DrawStoreList(void) const;
|
||||
void DrawStore(void) const;
|
||||
void DrawSearch(void) const;
|
||||
void DrawFullURLScreen(void) const;
|
||||
void DrawGitHubScreen(void) const;
|
||||
void DrawGlossary(void) const;
|
||||
|
||||
void SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch);
|
||||
void StoreSelectionLogic(u32 hDown, u32 hHeld, touchPosition touch);
|
||||
@@ -63,7 +68,7 @@ private:
|
||||
void deleteStore(int selectedStore);
|
||||
bool handleIfDisplayText();
|
||||
int mode = 0;
|
||||
int selectedOptionAppStore = 0;
|
||||
int lastMode = 1;
|
||||
mutable bool displayInformations = true;
|
||||
|
||||
// Stuff for the GitHub Store Search function and Full URL.
|
||||
@@ -71,20 +76,25 @@ private:
|
||||
std::string fileName = "";
|
||||
std::string FullURL = "";
|
||||
|
||||
mutable int selection = 0;
|
||||
mutable int selection2 = 0;
|
||||
// Selections.
|
||||
mutable int Selection = 0;
|
||||
int screenPos = 0;
|
||||
int screenPos2 = 0;
|
||||
mutable int screenPosList = 0;
|
||||
mutable int screenPosList2 = 0;
|
||||
|
||||
int searchSelection = 0;
|
||||
int subSelection = 0;
|
||||
|
||||
// Browse stuff.
|
||||
int keyRepeatDelay = 0;
|
||||
int fastMode = false;
|
||||
std::vector<DirEntry> dirContents;
|
||||
|
||||
// Other stuff.
|
||||
std::vector<StoreInfo> storeInfo; // Store Selection.
|
||||
std::vector<std::string> appStoreList; // Actual store. ;P
|
||||
std::vector<std::string> descLines;
|
||||
std::string storeDesc = "";
|
||||
nlohmann::json appStoreJson;
|
||||
std::string currentStoreFile;
|
||||
|
||||
// Icon | Button Structs.
|
||||
std::vector<Structs::ButtonPos> arrowPos = {
|
||||
{295, 0, 25, 25}, // Arrow Up.
|
||||
{295, 215, 25, 25}, // Arrow Down.
|
||||
@@ -93,20 +103,17 @@ private:
|
||||
{45, 0, 25, 25}, // Search.
|
||||
{85, 0, 25, 25}, // Update.
|
||||
};
|
||||
|
||||
std::vector<Structs::ButtonPos> URLBtn = {
|
||||
{10, 70, 140, 40}, // FULL URL.
|
||||
{170, 70, 140, 40}, // Github.
|
||||
{10, 145, 140, 40}, // TinyDB.
|
||||
{170, 145, 140, 40}, // QR Code?
|
||||
};
|
||||
|
||||
std::vector<Structs::ButtonPos> GitHubPos = {
|
||||
{30, 50, 260, 30}, // Owner & Repo.
|
||||
{30, 130, 260, 30}, // Filename.
|
||||
{135, 180, 50, 30}, // OK.
|
||||
};
|
||||
|
||||
std::vector<Structs::ButtonPos> subPos = {
|
||||
{90, 40, 140, 35}, // StoreList.
|
||||
{90, 100, 140, 35}, // storeSearch.
|
||||
|
||||
Reference in New Issue
Block a user