#pragma once #include "../GuiComponent.h" #include #include //Used to display a list of options. //Can select one or multiple options. struct ListEntry { std::string name; unsigned int color; bool selected; }; class OptionListComponent : public GuiComponent { public: OptionListComponent(Window* window); bool input(InputConfig* config, Input input); void render(const Eigen::Affine3f& trans); void setClosedCallback(std::function)> callback); template void populate(const std::vector& vec, std::function selector); std::vector getSelected(); private: void close(); std::function)> mClosedCallback; std::vector mEntries; };