mirror of https://github.com/axmolengine/axmol.git
Merge pull request #15278 from CocosRobot/update_lua_bindings_1458292141
[ci skip][AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
commit
ebb0f9361c
|
@ -13819,6 +13819,16 @@ node
|
||||||
{
|
{
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method getString
|
||||||
|
* @return {String}
|
||||||
|
*/
|
||||||
|
getString : function (
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return ;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method getDisabledColor
|
* @method getDisabledColor
|
||||||
* @return {color3b_object}
|
* @return {color3b_object}
|
||||||
|
|
|
@ -38132,6 +38132,24 @@ bool js_cocos2dx_MenuItemLabel_setLabel(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_setLabel : wrong number of arguments: %d, was expecting %d", argc, 1);
|
JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_setLabel : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
bool js_cocos2dx_MenuItemLabel_getString(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL);
|
||||||
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_getString : Invalid Native Object");
|
||||||
|
if (argc == 0) {
|
||||||
|
std::string ret = cobj->getString();
|
||||||
|
jsval jsret = JSVAL_NULL;
|
||||||
|
jsret = std_string_to_jsval(cx, ret);
|
||||||
|
args.rval().set(jsret);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_getString : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
bool js_cocos2dx_MenuItemLabel_getDisabledColor(JSContext *cx, uint32_t argc, jsval *vp)
|
bool js_cocos2dx_MenuItemLabel_getDisabledColor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
{
|
{
|
||||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||||
|
@ -38321,6 +38339,7 @@ void js_register_cocos2dx_MenuItemLabel(JSContext *cx, JS::HandleObject global)
|
||||||
|
|
||||||
static JSFunctionSpec funcs[] = {
|
static JSFunctionSpec funcs[] = {
|
||||||
JS_FN("setLabel", js_cocos2dx_MenuItemLabel_setLabel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("setLabel", js_cocos2dx_MenuItemLabel_setLabel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
JS_FN("getString", js_cocos2dx_MenuItemLabel_getString, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("getDisabledColor", js_cocos2dx_MenuItemLabel_getDisabledColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("getDisabledColor", js_cocos2dx_MenuItemLabel_getDisabledColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("setString", js_cocos2dx_MenuItemLabel_setString, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("setString", js_cocos2dx_MenuItemLabel_setString, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("initWithLabel", js_cocos2dx_MenuItemLabel_initWithLabel, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("initWithLabel", js_cocos2dx_MenuItemLabel_initWithLabel, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
|
|
@ -2464,6 +2464,7 @@ void js_cocos2dx_MenuItemLabel_finalize(JSContext *cx, JSObject *obj);
|
||||||
void js_register_cocos2dx_MenuItemLabel(JSContext *cx, JS::HandleObject global);
|
void js_register_cocos2dx_MenuItemLabel(JSContext *cx, JS::HandleObject global);
|
||||||
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
|
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
|
||||||
bool js_cocos2dx_MenuItemLabel_setLabel(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_MenuItemLabel_setLabel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
bool js_cocos2dx_MenuItemLabel_getString(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_MenuItemLabel_getDisabledColor(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_MenuItemLabel_getDisabledColor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_MenuItemLabel_setString(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_MenuItemLabel_setString(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_MenuItemLabel_initWithLabel(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_MenuItemLabel_initWithLabel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
|
|
@ -11,6 +11,12 @@
|
||||||
-- @param #cc.Node node
|
-- @param #cc.Node node
|
||||||
-- @return MenuItemLabel#MenuItemLabel self (return value: cc.MenuItemLabel)
|
-- @return MenuItemLabel#MenuItemLabel self (return value: cc.MenuItemLabel)
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
-- Get the inner string of the inner label.
|
||||||
|
-- @function [parent=#MenuItemLabel] getString
|
||||||
|
-- @param self
|
||||||
|
-- @return string#string ret (return value: string)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Gets the color that will be used when the item is disabled.
|
-- Gets the color that will be used when the item is disabled.
|
||||||
-- @function [parent=#MenuItemLabel] getDisabledColor
|
-- @function [parent=#MenuItemLabel] getDisabledColor
|
||||||
|
|
|
@ -57395,6 +57395,53 @@ int lua_cocos2dx_MenuItemLabel_setLabel(lua_State* tolua_S)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
int lua_cocos2dx_MenuItemLabel_getString(lua_State* tolua_S)
|
||||||
|
{
|
||||||
|
int argc = 0;
|
||||||
|
cocos2d::MenuItemLabel* cobj = nullptr;
|
||||||
|
bool ok = true;
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
tolua_Error tolua_err;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
if (!tolua_isusertype(tolua_S,1,"cc.MenuItemLabel",0,&tolua_err)) goto tolua_lerror;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
cobj = (cocos2d::MenuItemLabel*)tolua_tousertype(tolua_S,1,0);
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
if (!cobj)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_MenuItemLabel_getString'", 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_MenuItemLabel_getString'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
std::string ret = cobj->getString();
|
||||||
|
tolua_pushcppstring(tolua_S,ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MenuItemLabel:getString",argc, 0);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
tolua_lerror:
|
||||||
|
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_MenuItemLabel_getString'.",&tolua_err);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
int lua_cocos2dx_MenuItemLabel_getDisabledColor(lua_State* tolua_S)
|
int lua_cocos2dx_MenuItemLabel_getDisabledColor(lua_State* tolua_S)
|
||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
|
@ -57697,6 +57744,7 @@ int lua_register_cocos2dx_MenuItemLabel(lua_State* tolua_S)
|
||||||
tolua_beginmodule(tolua_S,"MenuItemLabel");
|
tolua_beginmodule(tolua_S,"MenuItemLabel");
|
||||||
tolua_function(tolua_S,"new",lua_cocos2dx_MenuItemLabel_constructor);
|
tolua_function(tolua_S,"new",lua_cocos2dx_MenuItemLabel_constructor);
|
||||||
tolua_function(tolua_S,"setLabel",lua_cocos2dx_MenuItemLabel_setLabel);
|
tolua_function(tolua_S,"setLabel",lua_cocos2dx_MenuItemLabel_setLabel);
|
||||||
|
tolua_function(tolua_S,"getString",lua_cocos2dx_MenuItemLabel_getString);
|
||||||
tolua_function(tolua_S,"getDisabledColor",lua_cocos2dx_MenuItemLabel_getDisabledColor);
|
tolua_function(tolua_S,"getDisabledColor",lua_cocos2dx_MenuItemLabel_getDisabledColor);
|
||||||
tolua_function(tolua_S,"setString",lua_cocos2dx_MenuItemLabel_setString);
|
tolua_function(tolua_S,"setString",lua_cocos2dx_MenuItemLabel_setString);
|
||||||
tolua_function(tolua_S,"initWithLabel",lua_cocos2dx_MenuItemLabel_initWithLabel);
|
tolua_function(tolua_S,"initWithLabel",lua_cocos2dx_MenuItemLabel_initWithLabel);
|
||||||
|
|
|
@ -2187,6 +2187,7 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // __cocos2dx_h__
|
#endif // __cocos2dx_h__
|
||||||
|
|
Loading…
Reference in New Issue