diff --git a/components/Menu.h b/components/Menu.h new file mode 100644 index 0000000..9ce4c70 --- /dev/null +++ b/components/Menu.h @@ -0,0 +1,107 @@ +#ifndef MENU_H +#define MENU_H + +#include "BaseComponent.h" +#include "TextLine.h" +#include "../mystl/my_vector.h" +#include "../utils/RichText.h" +#include "../utils/Color.h" +#include + +struct MenuOption { + std::string id, title; + + MenuOption(const std::string& id, const std::string& title) : id(id), title(title) {} + MenuOption() : id(), title() {} +}; + +class Menu : public BaseComponent { +private: + struct Option { + MenuOption option; + Text* text; + + Option(MenuOption option, Text* text) : option(option), text(text) {} + Option() : option(), text(nullptr) {} + }; + MyVector