diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js index c13fa79aae..e536ead178 100644 --- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js @@ -4669,14 +4669,14 @@ bool /** * @method create - * @param {String} arg0 - * @param {String} arg1 - * @param {float} arg2 - * @return {ccui.UICCTextField} - */ -create : function ( -str, -str, +* @param {String} str +* @param {String} str +* @param {float} float +* @return {ccui.UICCTextField|ccui.UICCTextField} +*/ +create : function( +str, +str, float ) { diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp index 6b1e7b570b..3c9a089060 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp @@ -11281,25 +11281,46 @@ bool js_cocos2dx_ui_UICCTextField_create(JSContext *cx, uint32_t argc, jsval *vp { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; - if (argc == 3) { - std::string arg0; - std::string arg1; - double arg2 = 0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_UICCTextField_create : Error processing arguments"); - - auto ret = cocos2d::ui::UICCTextField::create(arg0, arg1, arg2); - js_type_class_t *typeClass = js_get_type_from_native(ret); - JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::UICCTextField")); - args.rval().set(OBJECT_TO_JSVAL(jsret)); - return true; - } + + do { + if (argc == 3) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + double arg2 = 0; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); + if (!ok) { ok = true; break; } + cocos2d::ui::UICCTextField* ret = cocos2d::ui::UICCTextField::create(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + if (ret) { + jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject(cx, (cocos2d::ui::UICCTextField*)ret)); + } else { + jsret = JSVAL_NULL; + }; + args.rval().set(jsret); + return true; + } + } while (0); + + do { + if (argc == 0) { + cocos2d::ui::UICCTextField* ret = cocos2d::ui::UICCTextField::create(); + jsval jsret = JSVAL_NULL; + if (ret) { + jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject(cx, (cocos2d::ui::UICCTextField*)ret)); + } else { + jsret = JSVAL_NULL; + }; + args.rval().set(jsret); + return true; + } + } while (0); JS_ReportError(cx, "js_cocos2dx_ui_UICCTextField_create : wrong number of arguments"); return false; } - bool js_cocos2dx_ui_UICCTextField_constructor(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -11364,7 +11385,7 @@ void js_register_cocos2dx_ui_UICCTextField(JSContext *cx, JS::HandleObject globa }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ui_UICCTextField_create, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_UICCTextField_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END };