Add Category search menu. 👀

This commit is contained in:
StackZ
2020-06-20 16:37:03 +02:00
parent 7de012c2a2
commit 9860ea9719
5 changed files with 112 additions and 18 deletions
+2 -1
View File
@@ -45,13 +45,14 @@ private:
std::unique_ptr<Store> sortedStore;
bool darkMode = true, sheetLoaded = false, canDisplay = false, hasLoaded = false, isDropDown = false;
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;
int selectedBox = 0, lastViewMode = 0, dropSelection = 0, searchSelection = 0, iconAmount = 0, categorySelection = 0, selectedBoxList = 0, selection = -1, storePage = 0, downloadPage = 0, storePageList = 0, mode = 0, subSelection = 0, categoryPage = 0;
nlohmann::json storeJson;
C2D_SpriteSheet sheet;
std::vector<std::string> objects;
void DrawSortingMenu(void) const;
void DrawSearchMenu(void) const;
void DrawCategoryMenu(void) const;
// Base stuff.
void DrawBaseTop(void) const;
+3
View File
@@ -77,8 +77,11 @@ public:
else return -1; // Should not happen.
}
const std::vector<std::string> getCategories() { return this->availableCategories; }
private:
std::vector<UniStoreV2Struct> sortedStore, unsortedStore;
std::vector<std::string> availableCategories;
bool ascending = false;
nlohmann::json storeJson;
SortType sorttype = SortType::TITLE;