Overhaul of command parsing

This commit is contained in:
2021-11-16 12:20:11 -05:00
parent f933f451ad
commit 077b2fc23b
11 changed files with 138 additions and 158 deletions

View File

@@ -35,6 +35,12 @@ bool Gui::has_action(const std::string &action) const {
return false;
}
std::string Gui::get_action(int index) {
if ((index < 0) || (index >= elts_.size())) {
return "";
}
return elts_[index].action();
}
LuaDefine(gui_menu_item, "c") {
Gui *gui = Gui::fetch_global_pointer(L);