[ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18522)

This commit is contained in:
CocosRobot 2017-11-29 09:19:23 +08:00 committed by minggo
parent 7dee719a94
commit 187a6639e9
2 changed files with 46 additions and 25 deletions

View File

@ -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
)
{

View File

@ -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<cocos2d::ui::UICCTextField>(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<cocos2d::ui::UICCTextField>(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<cocos2d::ui::UICCTextField>(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
};