More refactoring and cleanup

This commit is contained in:
2021-11-16 13:14:59 -05:00
parent 077b2fc23b
commit 51a95cc964
8 changed files with 49 additions and 36 deletions

View File

@@ -30,13 +30,17 @@ class Gui {
public:
using EltVec = std::vector<GuiElt>;
private:
int64_t place_;
EltVec elts_;
public:
Gui() { place_ = 0; }
int64_t place() { return place_; }
const EltVec &elts() const { return elts_; }
void clear() { elts_.clear(); }
void clear(int64_t p) { place_ = p; elts_.clear(); }
bool has_action(const std::string &action) const;
void menu_item(const std::string &action, const std::string &label);
std::string get_action(int index);
std::string menu_debug_string() const;
// Put a pointer to a gui into the lua registry.
//