mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 08:39:05 +00:00
~~Cleanup~~ Changes. (#14)
* No builds allowed here as always on other branches, lmao. * Changes. ;)
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
|
||||
#include "utils/structs.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class FTPScreen : public screen
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
#include "screens/screen.hpp"
|
||||
|
||||
#include "utils/fileBrowse.h"
|
||||
#include "utils/structs.hpp"
|
||||
|
||||
#include <vector>
|
||||
@@ -40,17 +39,13 @@ public:
|
||||
void Draw(void) const override;
|
||||
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
|
||||
private:
|
||||
bool returnScriptState();
|
||||
bool returnStoreState();
|
||||
int Selection = 0;
|
||||
std::vector<DirEntry> dirContents; // To return Script/Store state.
|
||||
std::vector<Structs::ButtonPos> mainButtons = {
|
||||
{10, 40, 140, 35, -1}, // Scriptlist.
|
||||
{170, 40, 140, 35, -1}, // ScriptBrowse.
|
||||
{10, 100, 140, 35, -1}, // TinyDB.
|
||||
{170, 100, 140, 35, -1}, // ScriptCreator.
|
||||
{10, 160, 140, 35, -1}, // Language.
|
||||
{170, 160, 140, 35, -1}, // Colors.
|
||||
|
||||
std::vector<Structs::ButtonPos> mainButtons = {
|
||||
{10, 70, 140, 40, -1}, // Scripts.
|
||||
{170, 70, 140, 40, -1}, // UniStore.
|
||||
{10, 145, 140, 40, -1}, // Settings.
|
||||
{170, 145, 140, 40, -1}, // FTP.
|
||||
{0, 215, 25, 25, -1}, // Back Arrow.
|
||||
};
|
||||
};
|
||||
|
||||
@@ -38,16 +38,17 @@ class ScriptList : public screen
|
||||
public:
|
||||
void Draw(void) const override;
|
||||
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
|
||||
ScriptList();
|
||||
|
||||
private:
|
||||
void DrawSubMenu(void) const;
|
||||
void DrawList(void) const;
|
||||
void DrawSingleObject(void) const;
|
||||
|
||||
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;
|
||||
mutable int screenPos = 0;
|
||||
mutable int screenPosList = 0;
|
||||
@@ -64,6 +65,14 @@ private:
|
||||
{295, 215, 25, 25, -1}, // Arrow Down.
|
||||
{0, 215, 25, 25, -1}, // Back Arrow.
|
||||
{5, 0, 25, 25, -1}, // viewMode Change
|
||||
{45, 0, 25, 25, -1}, // Search.
|
||||
};
|
||||
|
||||
std::vector<Structs::ButtonPos> subPos = {
|
||||
{10, 70, 140, 40, -1}, // Script list.
|
||||
{170, 70, 140, 40, -1}, // Get Scripts.
|
||||
{10, 145, 140, 40, -1}, // Script Creator.
|
||||
{170, 145, 140, 40, -1}, // Script path change.
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -38,13 +38,13 @@ class UniStore : public screen
|
||||
public:
|
||||
void Draw(void) const override;
|
||||
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
|
||||
UniStore();
|
||||
|
||||
private:
|
||||
void DrawSubMenu(void) const;
|
||||
void DrawStoreList(void) const;
|
||||
void DrawStore(void) const;
|
||||
void DrawSearch(void) const;
|
||||
|
||||
void SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch);
|
||||
void StoreSelectionLogic(u32 hDown, u32 hHeld, touchPosition touch);
|
||||
void StoreLogic(u32 hDown, u32 hHeld, touchPosition touch);
|
||||
void SearchLogic(u32 hDown, u32 hHeld, touchPosition touch);
|
||||
@@ -61,6 +61,7 @@ private:
|
||||
mutable int screenPosList2 = 0;
|
||||
|
||||
int searchSelection = 0;
|
||||
int subSelection = 0;
|
||||
|
||||
int keyRepeatDelay = 0;
|
||||
int fastMode = false;
|
||||
@@ -79,6 +80,12 @@ private:
|
||||
{10, 100, 140, 35, -1}, // FULL URL.
|
||||
{170, 100, 140, 35, -1}, // Github.
|
||||
};
|
||||
|
||||
std::vector<Structs::ButtonPos> subPos = {
|
||||
{90, 40, 140, 35, -1}, // StoreList.
|
||||
{90, 100, 140, 35, -1}, // storeSearch.
|
||||
{90, 160, 140, 35, -1}, // storePathChange.
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -28,6 +28,8 @@ void getDirectoryContents(std::vector<DirEntry>& dirContents, const std::vector<
|
||||
void getDirectoryContents(std::vector<DirEntry>& dirContents);
|
||||
std::vector<std::string> getContents(const std::string &name, const std::vector<std::string> &extensionList);
|
||||
|
||||
bool returnIfExist(const std::string &path, const std::vector<std::string> &extensionList);
|
||||
|
||||
std::string selectFilePath(std::string selectText, const std::vector<std::string> &extensionList, int selectionMode = 1);
|
||||
|
||||
#endif //FILE_BROWSE_H
|
||||
Reference in New Issue
Block a user