Changed how userdata is handled
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define GUI_HPP
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include "luastack.hpp"
|
||||
|
||||
@@ -34,7 +35,17 @@ public:
|
||||
void clear() { elts_.clear(); }
|
||||
bool has_action(const std::string &action) const;
|
||||
void menu_item(const std::string &action, const std::string &label);
|
||||
|
||||
// Put a pointer to a gui into the lua registry.
|
||||
//
|
||||
// All lua commands that manipulate the GUI implicitly
|
||||
// operate on this global gui pointer.
|
||||
//
|
||||
static void store_global_pointer(lua_State *L, Gui *g);
|
||||
static Gui *fetch_global_pointer(lua_State *L);
|
||||
};
|
||||
|
||||
using GuiResult = std::map<std::string, std::string>;
|
||||
|
||||
#endif // GUI_HPP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user