mirror of https://github.com/axmolengine/axmol.git
Sync lua bindings for UserDefault Refactor
This commit is contained in:
parent
dc09756a94
commit
9a5d6b4f5e
|
@ -31004,74 +31004,6 @@ int lua_cocos2dx_UserDefault_destroyInstance(lua_State* tolua_S)
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_UserDefault_getXMLFilePath(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_getXMLFilePath'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
const std::string& ret = cocos2d::UserDefault::getXMLFilePath();
|
||||
lua_pushlstring(tolua_S,ret.c_str(),ret.length());
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.UserDefault:getXMLFilePath",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getXMLFilePath'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_UserDefault_isXMLFileExist(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_isXMLFileExist'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cocos2d::UserDefault::isXMLFileExist();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.UserDefault:isXMLFileExist",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_isXMLFileExist'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
static int lua_cocos2dx_UserDefault_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (UserDefault)");
|
||||
|
@ -31097,8 +31029,6 @@ int lua_register_cocos2dx_UserDefault(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"getDoubleForKey",lua_cocos2dx_UserDefault_getDoubleForKey);
|
||||
tolua_function(tolua_S,"setBoolForKey",lua_cocos2dx_UserDefault_setBoolForKey);
|
||||
tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_UserDefault_destroyInstance);
|
||||
tolua_function(tolua_S,"getXMLFilePath", lua_cocos2dx_UserDefault_getXMLFilePath);
|
||||
tolua_function(tolua_S,"isXMLFileExist", lua_cocos2dx_UserDefault_isXMLFileExist);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::UserDefault).name();
|
||||
g_luaType[typeName] = "cc.UserDefault";
|
||||
|
|
Loading…
Reference in New Issue