diff --git a/cocos/scripting/lua-bindings/auto/api/EditBox.lua b/cocos/scripting/lua-bindings/auto/api/EditBox.lua new file mode 100644 index 0000000000..787fa937d7 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/EditBox.lua @@ -0,0 +1,259 @@ + +-------------------------------- +-- @module EditBox +-- @extend Widget,IMEDelegate +-- @parent_module ccui + +-------------------------------- +-- js NA
+-- lua NA +-- @function [parent=#EditBox] keyboardDidShow +-- @param self +-- @param #cc.IMEKeyboardNotificationInfo info + +-------------------------------- +-- get a script Handler
+-- js NA
+-- lua NA +-- @function [parent=#EditBox] getScriptEditBoxHandler +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- Get the text entered in the edit box.
+-- return The text entered in the edit box. +-- @function [parent=#EditBox] getText +-- @param self +-- @return char#char ret (return value: char) + +-------------------------------- +-- js NA
+-- lua NA +-- @function [parent=#EditBox] keyboardDidHide +-- @param self +-- @param #cc.IMEKeyboardNotificationInfo info + +-------------------------------- +-- Set the placeholder's font name.
+-- param pFontName The font name. +-- @function [parent=#EditBox] setPlaceholderFontName +-- @param self +-- @param #char pFontName + +-------------------------------- +-- Get a text in the edit box that acts as a placeholder when an
+-- edit box is empty. +-- @function [parent=#EditBox] getPlaceHolder +-- @param self +-- @return char#char ret (return value: char) + +-------------------------------- +-- Set the font name.
+-- param pFontName The font name. +-- @function [parent=#EditBox] setFontName +-- @param self +-- @param #char pFontName + +-------------------------------- +-- Registers a script function that will be called for EditBox events.
+-- This handler will be removed automatically after onExit() called.
+-- code
+-- -- lua sample
+-- local function editboxEventHandler(eventType)
+-- if eventType == "began" then
+-- -- triggered when an edit box gains focus after keyboard is shown
+-- elseif eventType == "ended" then
+-- -- triggered when an edit box loses focus after keyboard is hidden.
+-- elseif eventType == "changed" then
+-- -- triggered when the edit box text was changed.
+-- elseif eventType == "return" then
+-- -- triggered when the return button was pressed or the outside area of keyboard was touched.
+-- end
+-- end
+-- local editbox = EditBox:create(Size(...), Scale9Sprite:create(...))
+-- editbox = registerScriptEditBoxHandler(editboxEventHandler)
+-- endcode
+-- param handler A number that indicates a lua function.
+-- js NA
+-- lua NA +-- @function [parent=#EditBox] registerScriptEditBoxHandler +-- @param self +-- @param #int handler + +-------------------------------- +-- Set the placeholder's font size.
+-- param fontSize The font size. +-- @function [parent=#EditBox] setPlaceholderFontSize +-- @param self +-- @param #int fontSize + +-------------------------------- +-- Set the input mode of the edit box.
+-- param inputMode One of the EditBox::InputMode constants. +-- @function [parent=#EditBox] setInputMode +-- @param self +-- @param #int inputMode + +-------------------------------- +-- Unregisters a script function that will be called for EditBox events.
+-- js NA
+-- lua NA +-- @function [parent=#EditBox] unregisterScriptEditBoxHandler +-- @param self + +-------------------------------- +-- js NA
+-- lua NA +-- @function [parent=#EditBox] keyboardWillShow +-- @param self +-- @param #cc.IMEKeyboardNotificationInfo info + +-------------------------------- +-- Set the font color of the placeholder text when the edit box is empty.
+-- Not supported on IOS. +-- @function [parent=#EditBox] setPlaceholderFontColor +-- @param self +-- @param #color3b_table color + +-------------------------------- +-- Set the font color of the widget's text. +-- @function [parent=#EditBox] setFontColor +-- @param self +-- @param #color3b_table color + +-------------------------------- +-- js NA
+-- lua NA +-- @function [parent=#EditBox] keyboardWillHide +-- @param self +-- @param #cc.IMEKeyboardNotificationInfo info + +-------------------------------- +-- +-- @function [parent=#EditBox] touchDownAction +-- @param self +-- @param #cc.Ref sender +-- @param #int controlEvent + +-------------------------------- +-- Set the placeholder's font.
+-- param pFontName The font name.
+-- param fontSize The font size. +-- @function [parent=#EditBox] setPlaceholderFont +-- @param self +-- @param #char pFontName +-- @param #int fontSize + +-------------------------------- +-- Set the font size.
+-- param fontSize The font size. +-- @function [parent=#EditBox] setFontSize +-- @param self +-- @param #int fontSize + +-------------------------------- +-- @overload self, size_table, ccui.Scale9Sprite +-- @overload self, size_table, string, int +-- @function [parent=#EditBox] initWithSizeAndBackgroundSprite +-- @param self +-- @param #size_table size +-- @param #string pNormal9SpriteBg +-- @param #int texType +-- @return bool#bool ret (retunr value: bool) + +-------------------------------- +-- Set a text in the edit box that acts as a placeholder when an
+-- edit box is empty.
+-- param pText The given text. +-- @function [parent=#EditBox] setPlaceHolder +-- @param self +-- @param #char pText + +-------------------------------- +-- Set the return type that are to be applied to the edit box.
+-- param returnType One of the EditBox::KeyboardReturnType constants. +-- @function [parent=#EditBox] setReturnType +-- @param self +-- @param #int returnType + +-------------------------------- +-- Set the input flags that are to be applied to the edit box.
+-- param inputFlag One of the EditBox::InputFlag constants. +-- @function [parent=#EditBox] setInputFlag +-- @param self +-- @param #int inputFlag + +-------------------------------- +-- Gets the maximum input length of the edit box.
+-- return Maximum input length. +-- @function [parent=#EditBox] getMaxLength +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- Set the text entered in the edit box.
+-- param pText The given text. +-- @function [parent=#EditBox] setText +-- @param self +-- @param #char pText + +-------------------------------- +-- Sets the maximum input length of the edit box.
+-- Setting this value enables multiline input mode by default.
+-- Available on Android, iOS and Windows Phone.
+-- param maxLength The maximum length. +-- @function [parent=#EditBox] setMaxLength +-- @param self +-- @param #int maxLength + +-------------------------------- +-- Set the font.
+-- param pFontName The font name.
+-- param fontSize The font size. +-- @function [parent=#EditBox] setFont +-- @param self +-- @param #char pFontName +-- @param #int fontSize + +-------------------------------- +-- @overload self, size_table, string, int +-- @overload self, size_table, ccui.Scale9Sprite, ccui.Scale9Sprite, ccui.Scale9Sprite +-- @function [parent=#EditBox] create +-- @param self +-- @param #size_table size +-- @param #ccui.Scale9Sprite normalSprite +-- @param #ccui.Scale9Sprite pressedSprite +-- @param #ccui.Scale9Sprite disabledSprite +-- @return EditBox#EditBox ret (retunr value: ccui.EditBox) + +-------------------------------- +-- +-- @function [parent=#EditBox] setAnchorPoint +-- @param self +-- @param #vec2_table anchorPoint + +-------------------------------- +-- +-- @function [parent=#EditBox] setPosition +-- @param self +-- @param #vec2_table pos + +-------------------------------- +-- +-- @function [parent=#EditBox] setVisible +-- @param self +-- @param #bool visible + +-------------------------------- +-- +-- @function [parent=#EditBox] setContentSize +-- @param self +-- @param #size_table size + +-------------------------------- +-- Constructor.
+-- js ctor +-- @function [parent=#EditBox] EditBox +-- @param self + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_ui_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_ui_auto_api.lua index 20e4195db3..cbcb0dce93 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_ui_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_ui_auto_api.lua @@ -136,4 +136,9 @@ -- @field [parent=#ccui] Scale9Sprite#Scale9Sprite Scale9Sprite preloaded module +-------------------------------------------------------- +-- the ccui EditBox +-- @field [parent=#ccui] EditBox#EditBox EditBox preloaded module + + return nil 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 f8f2061ee0..e6e3fafb88 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp @@ -19641,6 +19641,1436 @@ int lua_register_cocos2dx_ui_Scale9Sprite(lua_State* tolua_S) g_typeCast["Scale9Sprite"] = "ccui.Scale9Sprite"; return 1; } + +int lua_cocos2dx_ui_EditBox_keyboardDidShow(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_keyboardDidShow'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::IMEKeyboardNotificationInfo arg0; + + #pragma warning NO CONVERSION TO NATIVE FOR IMEKeyboardNotificationInfo + ok = false; + if(!ok) + return 0; + cobj->keyboardDidShow(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:keyboardDidShow",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_keyboardDidShow'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_getScriptEditBoxHandler(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_getScriptEditBoxHandler'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getScriptEditBoxHandler(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:getScriptEditBoxHandler",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_getScriptEditBoxHandler'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_getText(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_getText'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const char* ret = cobj->getText(); + tolua_pushstring(tolua_S,(const char*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:getText",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_getText'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_keyboardDidHide(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_keyboardDidHide'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::IMEKeyboardNotificationInfo arg0; + + #pragma warning NO CONVERSION TO NATIVE FOR IMEKeyboardNotificationInfo + ok = false; + if(!ok) + return 0; + cobj->keyboardDidHide(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:keyboardDidHide",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_keyboardDidHide'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setPlaceholderFontName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setPlaceholderFontName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "ccui.EditBox:setPlaceholderFontName"); arg0 = arg0_tmp.c_str(); + if(!ok) + return 0; + cobj->setPlaceholderFontName(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setPlaceholderFontName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setPlaceholderFontName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_getPlaceHolder(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_getPlaceHolder'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const char* ret = cobj->getPlaceHolder(); + tolua_pushstring(tolua_S,(const char*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:getPlaceHolder",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_getPlaceHolder'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setFontName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setFontName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "ccui.EditBox:setFontName"); arg0 = arg0_tmp.c_str(); + if(!ok) + return 0; + cobj->setFontName(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setFontName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setFontName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_registerScriptEditBoxHandler(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_registerScriptEditBoxHandler'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.EditBox:registerScriptEditBoxHandler"); + if(!ok) + return 0; + cobj->registerScriptEditBoxHandler(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:registerScriptEditBoxHandler",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_registerScriptEditBoxHandler'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setPlaceholderFontSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setPlaceholderFontSize'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.EditBox:setPlaceholderFontSize"); + if(!ok) + return 0; + cobj->setPlaceholderFontSize(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setPlaceholderFontSize",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setPlaceholderFontSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setInputMode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setInputMode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ui::EditBox::InputMode arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.EditBox:setInputMode"); + if(!ok) + return 0; + cobj->setInputMode(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setInputMode",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setInputMode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_unregisterScriptEditBoxHandler(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_unregisterScriptEditBoxHandler'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->unregisterScriptEditBoxHandler(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:unregisterScriptEditBoxHandler",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_unregisterScriptEditBoxHandler'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_keyboardWillShow(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_keyboardWillShow'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::IMEKeyboardNotificationInfo arg0; + + #pragma warning NO CONVERSION TO NATIVE FOR IMEKeyboardNotificationInfo + ok = false; + if(!ok) + return 0; + cobj->keyboardWillShow(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:keyboardWillShow",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_keyboardWillShow'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setPlaceholderFontColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setPlaceholderFontColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Color3B arg0; + + ok &= luaval_to_color3b(tolua_S, 2, &arg0, "ccui.EditBox:setPlaceholderFontColor"); + if(!ok) + return 0; + cobj->setPlaceholderFontColor(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setPlaceholderFontColor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setPlaceholderFontColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setFontColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setFontColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Color3B arg0; + + ok &= luaval_to_color3b(tolua_S, 2, &arg0, "ccui.EditBox:setFontColor"); + if(!ok) + return 0; + cobj->setFontColor(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setFontColor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setFontColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_keyboardWillHide(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_keyboardWillHide'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::IMEKeyboardNotificationInfo arg0; + + #pragma warning NO CONVERSION TO NATIVE FOR IMEKeyboardNotificationInfo + ok = false; + if(!ok) + return 0; + cobj->keyboardWillHide(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:keyboardWillHide",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_keyboardWillHide'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_touchDownAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_touchDownAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::Ref* arg0; + cocos2d::ui::Widget::TouchEventType arg1; + + ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); + + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.EditBox:touchDownAction"); + if(!ok) + return 0; + cobj->touchDownAction(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:touchDownAction",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_touchDownAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setPlaceholderFont(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setPlaceholderFont'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + int arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "ccui.EditBox:setPlaceholderFont"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.EditBox:setPlaceholderFont"); + if(!ok) + return 0; + cobj->setPlaceholderFont(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setPlaceholderFont",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setPlaceholderFont'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setFontSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setFontSize'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.EditBox:setFontSize"); + if(!ok) + return 0; + cobj->setFontSize(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setFontSize",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setFontSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_initWithSizeAndBackgroundSprite(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_initWithSizeAndBackgroundSprite'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + cocos2d::Size arg0; + ok &= luaval_to_size(tolua_S, 2, &arg0, "ccui.EditBox:initWithSizeAndBackgroundSprite"); + + if (!ok) { break; } + cocos2d::ui::Scale9Sprite* arg1; + ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1); + + if (!ok) { break; } + bool ret = cobj->initWithSizeAndBackgroundSprite(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + cocos2d::Size arg0; + ok &= luaval_to_size(tolua_S, 2, &arg0, "ccui.EditBox:initWithSizeAndBackgroundSprite"); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccui.EditBox:initWithSizeAndBackgroundSprite"); + + if (!ok) { break; } + bool ret = cobj->initWithSizeAndBackgroundSprite(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + cocos2d::Size arg0; + ok &= luaval_to_size(tolua_S, 2, &arg0, "ccui.EditBox:initWithSizeAndBackgroundSprite"); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccui.EditBox:initWithSizeAndBackgroundSprite"); + + if (!ok) { break; } + cocos2d::ui::Widget::TextureResType arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "ccui.EditBox:initWithSizeAndBackgroundSprite"); + + if (!ok) { break; } + bool ret = cobj->initWithSizeAndBackgroundSprite(arg0, arg1, arg2); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:initWithSizeAndBackgroundSprite",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_initWithSizeAndBackgroundSprite'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setPlaceHolder(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setPlaceHolder'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "ccui.EditBox:setPlaceHolder"); arg0 = arg0_tmp.c_str(); + if(!ok) + return 0; + cobj->setPlaceHolder(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setPlaceHolder",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setPlaceHolder'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setReturnType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setReturnType'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ui::EditBox::KeyboardReturnType arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.EditBox:setReturnType"); + if(!ok) + return 0; + cobj->setReturnType(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setReturnType",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setReturnType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setInputFlag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setInputFlag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ui::EditBox::InputFlag arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.EditBox:setInputFlag"); + if(!ok) + return 0; + cobj->setInputFlag(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setInputFlag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setInputFlag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_getMaxLength(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_getMaxLength'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getMaxLength(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:getMaxLength",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_getMaxLength'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setText(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setText'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "ccui.EditBox:setText"); arg0 = arg0_tmp.c_str(); + if(!ok) + return 0; + cobj->setText(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setText",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setText'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setMaxLength(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setMaxLength'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.EditBox:setMaxLength"); + if(!ok) + return 0; + cobj->setMaxLength(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setMaxLength",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setMaxLength'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_setFont(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* 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.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::EditBox*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_EditBox_setFont'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + int arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "ccui.EditBox:setFont"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.EditBox:setFont"); + if(!ok) + return 0; + cobj->setFont(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:setFont",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_setFont'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ui_EditBox_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"ccui.EditBox",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + cocos2d::Size arg0; + ok &= luaval_to_size(tolua_S, 2, &arg0, "ccui.EditBox:create"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccui.EditBox:create"); + if (!ok) { break; } + cocos2d::ui::EditBox* ret = cocos2d::ui::EditBox::create(arg0, arg1); + object_to_luaval(tolua_S, "ccui.EditBox",(cocos2d::ui::EditBox*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + cocos2d::Size arg0; + ok &= luaval_to_size(tolua_S, 2, &arg0, "ccui.EditBox:create"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccui.EditBox:create"); + if (!ok) { break; } + cocos2d::ui::Widget::TextureResType arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "ccui.EditBox:create"); + if (!ok) { break; } + cocos2d::ui::EditBox* ret = cocos2d::ui::EditBox::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "ccui.EditBox",(cocos2d::ui::EditBox*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + cocos2d::Size arg0; + ok &= luaval_to_size(tolua_S, 2, &arg0, "ccui.EditBox:create"); + if (!ok) { break; } + cocos2d::ui::Scale9Sprite* arg1; + ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1); + if (!ok) { break; } + cocos2d::ui::EditBox* ret = cocos2d::ui::EditBox::create(arg0, arg1); + object_to_luaval(tolua_S, "ccui.EditBox",(cocos2d::ui::EditBox*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + cocos2d::Size arg0; + ok &= luaval_to_size(tolua_S, 2, &arg0, "ccui.EditBox:create"); + if (!ok) { break; } + cocos2d::ui::Scale9Sprite* arg1; + ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1); + if (!ok) { break; } + cocos2d::ui::Scale9Sprite* arg2; + ok &= luaval_to_object(tolua_S, 4, "ccui.Scale9Sprite",&arg2); + if (!ok) { break; } + cocos2d::ui::EditBox* ret = cocos2d::ui::EditBox::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "ccui.EditBox",(cocos2d::ui::EditBox*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 4) + { + cocos2d::Size arg0; + ok &= luaval_to_size(tolua_S, 2, &arg0, "ccui.EditBox:create"); + if (!ok) { break; } + cocos2d::ui::Scale9Sprite* arg1; + ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1); + if (!ok) { break; } + cocos2d::ui::Scale9Sprite* arg2; + ok &= luaval_to_object(tolua_S, 4, "ccui.Scale9Sprite",&arg2); + if (!ok) { break; } + cocos2d::ui::Scale9Sprite* arg3; + ok &= luaval_to_object(tolua_S, 5, "ccui.Scale9Sprite",&arg3); + if (!ok) { break; } + cocos2d::ui::EditBox* ret = cocos2d::ui::EditBox::create(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "ccui.EditBox",(cocos2d::ui::EditBox*)ret); + return 1; + } + } while (0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d", "ccui.EditBox:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_ui_EditBox_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::EditBox* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj = new cocos2d::ui::EditBox(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"ccui.EditBox"); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.EditBox:EditBox",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_EditBox_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_ui_EditBox_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (EditBox)"); + return 0; +} + +int lua_register_cocos2dx_ui_EditBox(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"ccui.EditBox"); + tolua_cclass(tolua_S,"EditBox","ccui.EditBox","ccui.Widget",nullptr); + + tolua_beginmodule(tolua_S,"EditBox"); + tolua_function(tolua_S,"new",lua_cocos2dx_ui_EditBox_constructor); + tolua_function(tolua_S,"keyboardDidShow",lua_cocos2dx_ui_EditBox_keyboardDidShow); + tolua_function(tolua_S,"getScriptEditBoxHandler",lua_cocos2dx_ui_EditBox_getScriptEditBoxHandler); + tolua_function(tolua_S,"getText",lua_cocos2dx_ui_EditBox_getText); + tolua_function(tolua_S,"keyboardDidHide",lua_cocos2dx_ui_EditBox_keyboardDidHide); + tolua_function(tolua_S,"setPlaceholderFontName",lua_cocos2dx_ui_EditBox_setPlaceholderFontName); + tolua_function(tolua_S,"getPlaceHolder",lua_cocos2dx_ui_EditBox_getPlaceHolder); + tolua_function(tolua_S,"setFontName",lua_cocos2dx_ui_EditBox_setFontName); + tolua_function(tolua_S,"registerScriptEditBoxHandler",lua_cocos2dx_ui_EditBox_registerScriptEditBoxHandler); + tolua_function(tolua_S,"setPlaceholderFontSize",lua_cocos2dx_ui_EditBox_setPlaceholderFontSize); + tolua_function(tolua_S,"setInputMode",lua_cocos2dx_ui_EditBox_setInputMode); + tolua_function(tolua_S,"unregisterScriptEditBoxHandler",lua_cocos2dx_ui_EditBox_unregisterScriptEditBoxHandler); + tolua_function(tolua_S,"keyboardWillShow",lua_cocos2dx_ui_EditBox_keyboardWillShow); + tolua_function(tolua_S,"setPlaceholderFontColor",lua_cocos2dx_ui_EditBox_setPlaceholderFontColor); + tolua_function(tolua_S,"setFontColor",lua_cocos2dx_ui_EditBox_setFontColor); + tolua_function(tolua_S,"keyboardWillHide",lua_cocos2dx_ui_EditBox_keyboardWillHide); + tolua_function(tolua_S,"touchDownAction",lua_cocos2dx_ui_EditBox_touchDownAction); + tolua_function(tolua_S,"setPlaceholderFont",lua_cocos2dx_ui_EditBox_setPlaceholderFont); + tolua_function(tolua_S,"setFontSize",lua_cocos2dx_ui_EditBox_setFontSize); + tolua_function(tolua_S,"initWithSizeAndBackgroundSprite",lua_cocos2dx_ui_EditBox_initWithSizeAndBackgroundSprite); + tolua_function(tolua_S,"setPlaceHolder",lua_cocos2dx_ui_EditBox_setPlaceHolder); + tolua_function(tolua_S,"setReturnType",lua_cocos2dx_ui_EditBox_setReturnType); + tolua_function(tolua_S,"setInputFlag",lua_cocos2dx_ui_EditBox_setInputFlag); + tolua_function(tolua_S,"getMaxLength",lua_cocos2dx_ui_EditBox_getMaxLength); + tolua_function(tolua_S,"setText",lua_cocos2dx_ui_EditBox_setText); + tolua_function(tolua_S,"setMaxLength",lua_cocos2dx_ui_EditBox_setMaxLength); + tolua_function(tolua_S,"setFont",lua_cocos2dx_ui_EditBox_setFont); + tolua_function(tolua_S,"create", lua_cocos2dx_ui_EditBox_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::ui::EditBox).name(); + g_luaType[typeName] = "ccui.EditBox"; + g_typeCast["EditBox"] = "ccui.EditBox"; + return 1; +} TOLUA_API int register_all_cocos2dx_ui(lua_State* tolua_S) { tolua_open(tolua_S); @@ -19671,6 +21101,7 @@ TOLUA_API int register_all_cocos2dx_ui(lua_State* tolua_S) lua_register_cocos2dx_ui_RichElementText(tolua_S); lua_register_cocos2dx_ui_PageView(tolua_S); lua_register_cocos2dx_ui_Helper(tolua_S); + lua_register_cocos2dx_ui_EditBox(tolua_S); lua_register_cocos2dx_ui_Text(tolua_S); lua_register_cocos2dx_ui_RichText(tolua_S); lua_register_cocos2dx_ui_RichElementImage(tolua_S); 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 21138323be..10d0fc71d4 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp @@ -429,6 +429,35 @@ int register_all_cocos2dx_ui(lua_State* tolua_S); + + + + + + + + + + + + + + + + + + + + + + + + + + + + +