Merge pull request #18031 from CocosRobot/update_lua_bindings_1499218342

[ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically
This commit is contained in:
子龙山人 2017-07-05 15:35:24 +08:00 committed by GitHub
commit 1ce88edd22
6 changed files with 176 additions and 0 deletions

View File

@ -6058,6 +6058,26 @@ color3b
{
},
/**
* @method getHorizontalAlignment
* @return {ccui.RichText::HorizontalAlignment}
*/
getHorizontalAlignment : function (
)
{
return 0;
},
/**
* @method setHorizontalAlignment
* @param {ccui.RichText::HorizontalAlignment} arg0
*/
setHorizontalAlignment : function (
horizontalalignment
)
{
},
/**
* @method setAnchorTextDel
* @param {bool} arg0

View File

@ -15119,6 +15119,44 @@ bool js_cocos2dx_ui_RichText_setAnchorTextGlow(JSContext *cx, uint32_t argc, jsv
JS_ReportError(cx, "js_cocos2dx_ui_RichText_setAnchorTextGlow : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_ui_RichText_getHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::ui::RichText* cobj = (cocos2d::ui::RichText *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_RichText_getHorizontalAlignment : Invalid Native Object");
if (argc == 0) {
int ret = (int)cobj->getHorizontalAlignment();
JS::RootedValue jsret(cx);
jsret = int32_to_jsval(cx, ret);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_RichText_getHorizontalAlignment : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_ui_RichText_setHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true;
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::ui::RichText* cobj = (cocos2d::ui::RichText *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_RichText_setHorizontalAlignment : Invalid Native Object");
if (argc == 1) {
cocos2d::ui::RichText::HorizontalAlignment arg0;
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_RichText_setHorizontalAlignment : Error processing arguments");
cobj->setHorizontalAlignment(arg0);
args.rval().setUndefined();
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_RichText_setHorizontalAlignment : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_ui_RichText_setAnchorTextDel(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -15926,6 +15964,8 @@ void js_register_cocos2dx_ui_RichText(JSContext *cx, JS::HandleObject global) {
JS_FN("setAnchorFontColor", js_cocos2dx_ui_RichText_setAnchorFontColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setFontFace", js_cocos2dx_ui_RichText_setFontFace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setAnchorTextGlow", js_cocos2dx_ui_RichText_setAnchorTextGlow, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getHorizontalAlignment", js_cocos2dx_ui_RichText_getHorizontalAlignment, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setHorizontalAlignment", js_cocos2dx_ui_RichText_setHorizontalAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setAnchorTextDel", js_cocos2dx_ui_RichText_setAnchorTextDel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getAnchorTextOutlineColor3B", js_cocos2dx_ui_RichText_getAnchorTextOutlineColor3B, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("stringWithColor4B", js_cocos2dx_ui_RichText_stringWithColor4B, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),

View File

@ -779,6 +779,8 @@ bool js_cocos2dx_ui_RichText_isAnchorTextItalicEnabled(JSContext *cx, uint32_t a
bool js_cocos2dx_ui_RichText_setAnchorFontColor(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_RichText_setFontFace(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_RichText_setAnchorTextGlow(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_RichText_getHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_RichText_setHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_RichText_setAnchorTextDel(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_RichText_getAnchorTextOutlineColor3B(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_RichText_stringWithColor4B(JSContext *cx, uint32_t argc, jsval *vp);

View File

@ -94,6 +94,19 @@
-- @param #color3b_table glowColor
-- @return RichText#RichText self (return value: ccui.RichText)
--------------------------------
--
-- @function [parent=#RichText] getHorizontalAlignment
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
--
-- @function [parent=#RichText] setHorizontalAlignment
-- @param self
-- @param #int a
-- @return RichText#RichText self (return value: ccui.RichText)
--------------------------------
--
-- @function [parent=#RichText] setAnchorTextDel

View File

@ -28061,6 +28061,103 @@ int lua_cocos2dx_ui_RichText_setAnchorTextGlow(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_RichText_getHorizontalAlignment(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::RichText* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.RichText",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::RichText*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_RichText_getHorizontalAlignment'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_RichText_getHorizontalAlignment'", nullptr);
return 0;
}
int ret = (int)cobj->getHorizontalAlignment();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.RichText:getHorizontalAlignment",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_RichText_getHorizontalAlignment'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_RichText_setHorizontalAlignment(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::RichText* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.RichText",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::RichText*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_RichText_setHorizontalAlignment'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::ui::RichText::HorizontalAlignment arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.RichText:setHorizontalAlignment");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_RichText_setHorizontalAlignment'", nullptr);
return 0;
}
cobj->setHorizontalAlignment(arg0);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.RichText:setHorizontalAlignment",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_RichText_setHorizontalAlignment'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_RichText_setAnchorTextDel(lua_State* tolua_S)
{
int argc = 0;
@ -29794,6 +29891,8 @@ int lua_register_cocos2dx_ui_RichText(lua_State* tolua_S)
tolua_function(tolua_S,"setAnchorFontColor",lua_cocos2dx_ui_RichText_setAnchorFontColor);
tolua_function(tolua_S,"setFontFace",lua_cocos2dx_ui_RichText_setFontFace);
tolua_function(tolua_S,"setAnchorTextGlow",lua_cocos2dx_ui_RichText_setAnchorTextGlow);
tolua_function(tolua_S,"getHorizontalAlignment",lua_cocos2dx_ui_RichText_getHorizontalAlignment);
tolua_function(tolua_S,"setHorizontalAlignment",lua_cocos2dx_ui_RichText_setHorizontalAlignment);
tolua_function(tolua_S,"setAnchorTextDel",lua_cocos2dx_ui_RichText_setAnchorTextDel);
tolua_function(tolua_S,"getAnchorTextOutlineColor3B",lua_cocos2dx_ui_RichText_getAnchorTextOutlineColor3B);
tolua_function(tolua_S,"stringWithColor4B",lua_cocos2dx_ui_RichText_stringWithColor4B);

View File

@ -777,6 +777,8 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);