1
0

Improved DoWithID bindings.

This commit is contained in:
Mattes D 2015-03-19 16:24:32 +01:00
parent 241c441de7
commit 2fed8c3227
2 changed files with 8 additions and 3 deletions

View File

@ -639,7 +639,7 @@ static int tolua_DoWithID(lua_State* tolua_S)
virtual bool Item(Ty2 * a_Item) override
{
lua_rawgeti(LuaState, LUA_REGISTRYINDEX, FuncRef); // Push function to call
tolua_pushusertype(LuaState, a_Item, Ty2::GetClassStatic()); // Push the item
tolua_pushusertype(LuaState, a_Item, a_Item->GetClass()); // Push the item
if (TableRef != LUA_REFNIL)
{
lua_rawgeti(LuaState, LUA_REGISTRYINDEX, TableRef); // Push the optional callbackdata param

View File

@ -189,6 +189,11 @@ public:
return "cMap";
}
const char * GetClass(void) // Needed for ManualBindings' DoWith templates
{
return "cMap";
}
protected: