Got rid of AnimView, added Gui

This commit is contained in:
2021-02-07 13:38:29 -05:00
parent 0721d29c72
commit 1ff94e2591
13 changed files with 118 additions and 123 deletions

39
luprex/cpp/gui.hpp Normal file
View File

@@ -0,0 +1,39 @@
#ifndef GUI_HPP
#define GUI_HPP
#include <string>
#include <vector>
#include "luastack.hpp"
class GuiElt {
friend class Gui;
public:
enum Type {
TYPE_MENU_ITEM,
};
private:
Type type_;
std::string id_;
std::string label_;
GuiElt() {}
public:
~GuiElt() {}
Type type() const { return type_; }
const std::string &id() const { return id_; }
const std::string &label() const { return label_; }
};
class Gui {
public:
using EltVec = std::vector<GuiElt>;
private:
EltVec elts_;
public:
const EltVec &elts() const { return elts_; }
void clear() { elts_.clear(); }
void add_menu_item(const std::string &id, const std::string &label);
};
#endif // GUI_HPP