diff --git a/cocos/scripting/lua-bindings/auto/api/TextField.lua b/cocos/scripting/lua-bindings/auto/api/TextField.lua index 006ea4a57a..f98098cd9f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextField.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextField.lua @@ -81,6 +81,11 @@ -- @function [parent=#TextField] attachWithIME -- @param self +-------------------------------- +-- @function [parent=#TextField] getStringLength +-- @param self +-- @return int#int ret (return value: int) + -------------------------------- -- @function [parent=#TextField] setPasswordEnabled -- @param self diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp index 664680a6a2..8656d1f194 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp @@ -13679,6 +13679,50 @@ int lua_cocos2dx_ui_TextField_attachWithIME(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_TextField_getStringLength(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::TextField* 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.TextField",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::TextField*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_TextField_getStringLength'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getStringLength(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getStringLength",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_TextField_getStringLength'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_TextField_setPasswordEnabled(lua_State* tolua_S) { int argc = 0; @@ -14643,6 +14687,7 @@ int lua_register_cocos2dx_ui_TextField(lua_State* tolua_S) tolua_function(tolua_S,"getFontName",lua_cocos2dx_ui_TextField_getFontName); tolua_function(tolua_S,"setTextAreaSize",lua_cocos2dx_ui_TextField_setTextAreaSize); tolua_function(tolua_S,"attachWithIME",lua_cocos2dx_ui_TextField_attachWithIME); + tolua_function(tolua_S,"getStringLength",lua_cocos2dx_ui_TextField_getStringLength); tolua_function(tolua_S,"setPasswordEnabled",lua_cocos2dx_ui_TextField_setPasswordEnabled); tolua_function(tolua_S,"getPasswordStyleText",lua_cocos2dx_ui_TextField_getPasswordStyleText); tolua_function(tolua_S,"setMaxLengthEnabled",lua_cocos2dx_ui_TextField_setMaxLengthEnabled); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp index 075036bb49..7ad26a3447 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp @@ -385,6 +385,7 @@ int register_all_cocos2dx_ui(lua_State* tolua_S); + #endif // __cocos2dx_ui_h__