Fixed issues with new module system

This commit is contained in:
Ryzerth
2020-09-20 00:19:39 +02:00
parent d6b9e1d86a
commit 9de585190f
38 changed files with 460 additions and 358 deletions

23
core/src/gui/menu.h Normal file
View File

@@ -0,0 +1,23 @@
#pragma once
#include <string>
#include <vector>
#include <map>
class Menu {
public:
Menu();
struct MenuItem_t {
void (*drawHandler)(void* ctx);
void* ctx;
};
void registerEntry(std::string name, void (*drawHandler)(void* ctx), void* ctx = NULL);
void removeEntry(std::string name);
void draw();
std::vector<std::string> order;
private:
std::map<std::string, MenuItem_t> items;
};