Implement Script Downloading and parsing of the Informations.

To-Do: Revision checking of the current and new Scripts.
This commit is contained in:
VoltZ
2019-11-06 13:54:45 +01:00
parent 77680d2a78
commit 715c09179b
8 changed files with 103 additions and 83 deletions
+1 -3
View File
@@ -109,6 +109,4 @@ namespace download {
void deleteFileList(std::string file, std::string message);
void installFileList(std::string file, std::string message);
void extractFileList(std::string file, std::string input, std::string output, std::string message);
}
void downloadScripts(void);
}
+3
View File
@@ -29,6 +29,7 @@
#include "screens/screen.hpp"
#include "screens/screenCommon.hpp"
#include "utils/config.hpp"
#include "utils/fileBrowse.h"
class ScriptBrowse : public Screen
@@ -36,8 +37,10 @@ class ScriptBrowse : public Screen
public:
void Draw(void) const override;
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
ScriptBrowse();
private:
nlohmann::json currentFile;
std::vector<DirEntry> dirContents;
mutable int screenPos = 0;
mutable int selection = 0;
+1
View File
@@ -26,5 +26,6 @@ void findNdsFiles(vector<DirEntry>& dirContents);
bool nameEndsWith(const std::string& name, const std::vector<std::string> extensionList);
void getDirectoryContents(std::vector<DirEntry>& dirContents, const std::vector<std::string> extensionList);
void getDirectoryContents(std::vector<DirEntry>& dirContents);
std::vector<std::string> getContents(const std::string &name, const std::vector<std::string> &extensionList);
#endif //FILE_BROWSE_H