mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Add search menu.
This commit is contained in:
@@ -45,12 +45,13 @@ private:
|
||||
std::unique_ptr<Store> sortedStore;
|
||||
|
||||
bool darkMode = true, sheetLoaded = false, canDisplay = false, hasLoaded = false, isDropDown = false;
|
||||
int selectedBox = 0, lastViewMode = 0, dropSelection = 0, iconAmount = 0, selectedBoxList = 0, selection = -1, storePage = 0, downloadPage = 0, storePageList = 0, mode = 0, subSelection = 0;
|
||||
int selectedBox = 0, lastViewMode = 0, dropSelection = 0, searchSelection = 0, iconAmount = 0, selectedBoxList = 0, selection = -1, storePage = 0, downloadPage = 0, storePageList = 0, mode = 0, subSelection = 0;
|
||||
nlohmann::json storeJson;
|
||||
C2D_SpriteSheet sheet;
|
||||
std::vector<std::string> objects;
|
||||
|
||||
void DrawSortingMenu(void) const;
|
||||
void DrawSearchMenu(void) const;
|
||||
|
||||
// Base stuff.
|
||||
void DrawBaseTop(void) const;
|
||||
@@ -120,6 +121,13 @@ private:
|
||||
{115, 170, 100, 30} // Last Updated.
|
||||
};
|
||||
|
||||
const std::vector<Structs::ButtonPos> searchPos = {
|
||||
{0, 60, 149, 52}, // Title.
|
||||
{162, 60, 149, 52}, // Author.
|
||||
{0, 130, 149, 52}, // Category.
|
||||
{162, 130, 149, 52} // Console.
|
||||
};
|
||||
|
||||
u32 barColorLight, barColorDark, bgColorLight, bgColorDark, textColorLight, textColorDark, boxColorLight, boxColorDark, outlineColorLight, outlineColorDark;
|
||||
};
|
||||
|
||||
|
||||
@@ -61,7 +61,13 @@ public:
|
||||
int returnJSONIndex(const int index);
|
||||
int getSize();
|
||||
bool getAscending() { return this->ascending; }
|
||||
|
||||
// Searching stuff.
|
||||
int searchForEntries(const std::string searchResult);
|
||||
int searchForAuthor(const std::string searchResult);
|
||||
int searchForCategory(const std::string searchResult);
|
||||
int searchForConsole(const std::string searchResult);
|
||||
|
||||
void reset() { this->sortedStore = this->unsortedStore; }
|
||||
|
||||
const int getSortType() {
|
||||
|
||||
Reference in New Issue
Block a user