Added persistant menu open/close

This commit is contained in:
Ryzerth
2021-04-22 23:49:35 +02:00
parent ed83abaeef
commit 1dbdf48e9a
6 changed files with 228 additions and 191 deletions

View File

@@ -8,6 +8,11 @@ class Menu {
public:
Menu();
struct MenuOption_t {
std::string name;
bool open;
};
struct MenuItem_t {
void (*drawHandler)(void* ctx);
void* ctx;
@@ -16,9 +21,9 @@ public:
void registerEntry(std::string name, void (*drawHandler)(void* ctx), void* ctx = NULL, ModuleManager::Instance* inst = NULL);
void removeEntry(std::string name);
void draw();
bool draw();
std::vector<std::string> order;
std::vector<MenuOption_t> order;
private:
bool isInOrderList(std::string name);